From 51c3faca603e72b4e8812470abb59de839c5a393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mal=C3=BD?= Date: Sun, 26 Jun 2011 22:06:47 +0200 Subject: [PATCH 2/2] Add support for DFGT. --- wheels.c | 24 ++++++++++++++++++++++++ wheels.h | 7 ++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/wheels.c b/wheels.c index b44f6d3..20d7594 100644 --- a/wheels.c +++ b/wheels.c @@ -15,6 +15,30 @@ int get_nativemode_cmd_DFP(cmdstruct *c) return 0; } +int get_nativemode_cmd_DFGT(cmdstruct *c) +{ + c->cmds[0][0] = 0xf8; + c->cmds[0][1] = 0x0a; + c->cmds[0][2] = 0x00; + c->cmds[0][3] = 0x00; + c->cmds[0][4] = 0x00; + c->cmds[0][5] = 0x00; + c->cmds[0][6] = 0x00; + c->cmds[0][7] = 0x00; + + c->cmds[1][0] = 0xf8; + c->cmds[1][1] = 0x09; + c->cmds[1][2] = 0x03; + c->cmds[1][3] = 0x01; + c->cmds[1][4] = 0x00; + c->cmds[1][5] = 0x00; + c->cmds[1][6] = 0x00; + c->cmds[1][7] = 0x00; + + c->numCmds = 2; + return 0; +} + int get_nativemode_cmd_G25(cmdstruct *c) { c->cmds[0][0] = 0xf8; diff --git a/wheels.h b/wheels.h index f0791be..53b8f6f 100644 --- a/wheels.h +++ b/wheels.h @@ -46,6 +46,7 @@ typedef struct { int get_nativemode_cmd_DFP(cmdstruct *c); +int get_nativemode_cmd_DFGT(cmdstruct *c); int get_nativemode_cmd_G25(cmdstruct *c); int get_nativemode_cmd_G27(cmdstruct *c); int get_range_cmd(cmdstruct *c, int range); @@ -122,9 +123,9 @@ static const wheelstruct wheels[] = { 40, 900, 0, - 0, - 0, - 0 + &get_nativemode_cmd_DFGT, + &get_range_cmd, + &get_autocenter_cmd }, { "G27", -- 1.7.5.4