mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 11:54:30 +03:00
some fixes of old bugs
This commit is contained in:
@@ -249,6 +249,12 @@ static void build(strhash *H, int hno, int hlen){
|
||||
}
|
||||
fprintf(source, "%s", ffooter);
|
||||
fclose(source);
|
||||
fprintf(header, "\n\n");
|
||||
for(int i = 0; i < hlen; ++i){
|
||||
char *m = macroname(H[i].str);
|
||||
fprintf(header, "#define STR_%-*s \"%s\"\n", lmax, m, H[i].str);
|
||||
}
|
||||
|
||||
fclose(header);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,3 +77,66 @@ extern char lastcmd[];
|
||||
#define CMD_USARTSTATUS (4007098968)
|
||||
#define CMD_VDRIVE (2172773525)
|
||||
#define CMD_VFIVE (3017477285)
|
||||
|
||||
|
||||
#define STR_ABSPOS "abspos"
|
||||
#define STR_ACCEL "accel"
|
||||
#define STR_ADC "adc"
|
||||
#define STR_BUTTON "button"
|
||||
#define STR_CANERRCODES "canerrcodes"
|
||||
#define STR_CANFILTER "canfilter"
|
||||
#define STR_CANFLOOD "canflood"
|
||||
#define STR_CANFLOODT "canfloodT"
|
||||
#define STR_CANID "canid"
|
||||
#define STR_CANIGNORE "canignore"
|
||||
#define STR_CANINCRFLOOD "canincrflood"
|
||||
#define STR_CANPAUSE "canpause"
|
||||
#define STR_CANREINIT "canreinit"
|
||||
#define STR_CANRESUME "canresume"
|
||||
#define STR_CANSEND "cansend"
|
||||
#define STR_CANSPEED "canspeed"
|
||||
#define STR_CANSTAT "canstat"
|
||||
#define STR_DIAGN "diagn"
|
||||
#define STR_DRVTYPE "drvtype"
|
||||
#define STR_DUMPCMD "dumpcmd"
|
||||
#define STR_DUMPCONF "dumpconf"
|
||||
#define STR_DUMPERR "dumperr"
|
||||
#define STR_DUMPMOT "dumpmot"
|
||||
#define STR_DUMPMOTFLAGS "dumpmotflags"
|
||||
#define STR_DUMPSTATES "dumpstates"
|
||||
#define STR_EMSTOP "emstop"
|
||||
#define STR_ERASEFLASH "eraseflash"
|
||||
#define STR_ESW "esw"
|
||||
#define STR_ESWREACT "eswreact"
|
||||
#define STR_GOTO "goto"
|
||||
#define STR_GOTOZ "gotoz"
|
||||
#define STR_GPIO "gpio"
|
||||
#define STR_GPIOCONF "gpioconf"
|
||||
#define STR_HELP "help"
|
||||
#define STR_MAXSPEED "maxspeed"
|
||||
#define STR_MAXSTEPS "maxsteps"
|
||||
#define STR_MCUT "mcut"
|
||||
#define STR_MCUVDD "mcuvdd"
|
||||
#define STR_MICROSTEPS "microsteps"
|
||||
#define STR_MINSPEED "minspeed"
|
||||
#define STR_MOTCURRENT "motcurrent"
|
||||
#define STR_MOTFLAGS "motflags"
|
||||
#define STR_MOTMUL "motmul"
|
||||
#define STR_MOTNO "motno"
|
||||
#define STR_MOTREINIT "motreinit"
|
||||
#define STR_PDN "pdn"
|
||||
#define STR_PING "ping"
|
||||
#define STR_RELPOS "relpos"
|
||||
#define STR_RELSLOW "relslow"
|
||||
#define STR_RESET "reset"
|
||||
#define STR_SAVECONF "saveconf"
|
||||
#define STR_SCREEN "screen"
|
||||
#define STR_SPEEDLIMIT "speedlimit"
|
||||
#define STR_STATE "state"
|
||||
#define STR_STOP "stop"
|
||||
#define STR_TIME "time"
|
||||
#define STR_TMCBUS "tmcbus"
|
||||
#define STR_UDATA "udata"
|
||||
#define STR_USARTSTATUS "usartstatus"
|
||||
#define STR_VDRIVE "vdrive"
|
||||
#define STR_VFIVE "vfive"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"cansend - send data over CAN: send ID byte0 .. byteN (N<8)\n"
|
||||
"canspeed - GS CAN speed (reinit if setter)\n"
|
||||
"canstat - G CAN status\n"
|
||||
"diagn[N]* - G DIAG state of motor N (or all)\n"
|
||||
"diagn[N] - G DIAG state of motor N (or all)\n"
|
||||
"drvtypeN - GS driver type (0 - only step/dir, 1 - UART, 2 - SPI, 3 - reserved)\n"
|
||||
"dumperr - dump error codes\n"
|
||||
"dumpcmd - dump command codes\n"
|
||||
@@ -26,11 +26,11 @@
|
||||
"emstop[N] - emergency stop motor N or all\n"
|
||||
"eraseflash [=N] - erase flash data storage (full or only N'th page of it)\n"
|
||||
"esw[N] - G end-switches state\n"
|
||||
"eswreactN - GS end-switches reaction (0 - ignore, 1 - stop@any, 2 - stop@zero)\n"
|
||||
"eswreactN - GS end-switches reaction (0 - ignore, 1 - ignore ESW1 and stop@0 only when moving negative, 2 - stop@any, 3 - stop@dir)\n"
|
||||
"gotoN - GS move motor to given absolute position\n"
|
||||
"gotozN - find zero position & refresh counters\n"
|
||||
"gpioconfN* - GS GPIO configuration (0 - PUin, 1 - PPout, 2 - ODout), N=0..2\n"
|
||||
"gpioN* - GS GPIO values, N=0..2\n"
|
||||
"gpioN - GS GPIO values, N=0..2\n"
|
||||
"help - print this help\n"
|
||||
"maxspeedN - GS max speed (steps per sec)\n"
|
||||
"maxstepsN - GS max steps (from zero ESW)\n"
|
||||
|
||||
Reference in New Issue
Block a user