diff --git a/F3:F303/Multistepper/adc.c b/F3:F303/Multistepper/adc.c index 8817bc3..6cb5a9d 100644 --- a/F3:F303/Multistepper/adc.c +++ b/F3:F303/Multistepper/adc.c @@ -132,18 +132,18 @@ uint16_t getADCval(int nch){ return p[4]; } -// get voltage @input nch (V) -float getADCvoltage(int nch){ +// get voltage @input nch (V) *1000V +int32_t getADCvoltage(int nch){ float v = getADCval(nch) * 3.3; - v /= 4096.f; // 12bit ADC + v /= 4.096f; // 12bit ADC #ifdef EBUG DBG("v="); printf(v); newline(); #endif - return v; + return (uint32_t) v; } -// return MCU temperature (degrees of celsius) -float getMCUtemp(){ +// return MCU temperature (*1000 degrees of celsius) +int32_t getMCUtemp(){ // make correction on Vdd value int32_t ADval = getADCval(ADC_TS); float temperature = (float) *TEMP30_CAL_ADDR - ADval; @@ -153,15 +153,15 @@ float getMCUtemp(){ #ifdef EBUG DBG("t="); printf(temperature); newline(); #endif - return(temperature); + return (uint32_t) (temperature*1000.f); } -// return ADC Vref (V) -float getVdd(){ +// return ADC Vref (V) *1000V +int32_t getVdd(){ float vdd = ((float) *VREFINT_CAL_ADDR) * 3.3f; // 3.3V vdd /= getADCval(ADC_VREF); #ifdef EBUG DBG("vdd="); printf(vdd); newline(); #endif - return vdd; + return (uint32_t) (vdd * 1000.f); } diff --git a/F3:F303/Multistepper/adc.h b/F3:F303/Multistepper/adc.h index ded850a..68970f8 100644 --- a/F3:F303/Multistepper/adc.h +++ b/F3:F303/Multistepper/adc.h @@ -43,7 +43,7 @@ #define ADC2START (9*NUMBER_OF_ADC1_CHANNELS) void adc_setup(); -float getMCUtemp(); -float getVdd(); +int32_t getMCUtemp(); +int32_t getVdd(); uint16_t getADCval(int nch); -float getADCvoltage(int nch); +int32_t getADCvoltage(int nch); diff --git a/F3:F303/Multistepper/commonproto.c b/F3:F303/Multistepper/commonproto.c index 562dfae..872bf3d 100644 --- a/F3:F303/Multistepper/commonproto.c +++ b/F3:F303/Multistepper/commonproto.c @@ -53,22 +53,26 @@ errcodes cu_abspos(uint8_t _U_ par, int32_t _U_ *val){ errcodes cu_accel(uint8_t _U_ par, int32_t _U_ *val){ uint8_t n; CHECKN(n, par); + errcodes ret = ERR_OK; if(ISSETTER(par)){ if(*val/the_conf.microsteps[n] > ACCELMAXSTEPS || *val < 1) return ERR_BADVAL; + uint16_t acc = the_conf.accel[n]; the_conf.accel[n] = *val; - update_stepper(n); + if(!update_stepper(n)){ + the_conf.accel[n] = acc; + ret = ERR_CANTRUN; + } } *val = the_conf.accel[n]; - return ERR_OK; + return ret; } static const uint8_t extADCchnl[NUMBER_OF_EXT_ADC_CHANNELS] = {ADC_AIN0, ADC_AIN1, ADC_AIN2, ADC_AIN3}; -// V*100 +// V*1000 errcodes cu_adc(uint8_t par, int32_t *val){ uint8_t n = PARBASE(par); if(n > NUMBER_OF_EXT_ADC_CHANNELS - 1) return ERR_BADPAR; - float v = getADCvoltage(extADCchnl[n])*100.f; - *val = (int32_t)v; + *val = getADCvoltage(extADCchnl[n]); return ERR_OK; } @@ -121,13 +125,18 @@ errcodes cu_esw(uint8_t par, int32_t *val){ errcodes cu_eswreact(uint8_t _U_ par, int32_t _U_ *val){ uint8_t n; CHECKN(n, par); + errcodes ret = ERR_OK; if(ISSETTER(par)){ if(*val < 0 || *val > ESW_AMOUNT-1) return ERR_BADVAL; + uint8_t react = the_conf.ESW_reaction[n]; the_conf.ESW_reaction[n] = *val; - update_stepper(n); + if(!update_stepper(n)){ + the_conf.ESW_reaction[n] = react; + ret = ERR_CANTRUN; + } } *val = geteswreact(n); - return ERR_OK; + return ret; } errcodes cu_goto(uint8_t _U_ par, int32_t _U_ *val){ @@ -201,13 +210,18 @@ static uint16_t getSPD(uint8_t n, int32_t speed){ errcodes cu_maxspeed(uint8_t _U_ par, int32_t _U_ *val){ uint8_t n; CHECKN(n, par); + errcodes ret = ERR_OK; if(ISSETTER(par)){ if(*val <= the_conf.minspd[n]) return ERR_BADVAL; + uint16_t maxspd = the_conf.maxspd[n]; the_conf.maxspd[n] = getSPD(n, *val); - update_stepper(n); + if(!update_stepper(n)){ + the_conf.maxspd[n] = maxspd; + ret = ERR_CANTRUN; + } } *val = the_conf.maxspd[n]; - return ERR_OK; + return ret; } errcodes cu_maxsteps(uint8_t _U_ par, int32_t _U_ *val){ @@ -222,15 +236,14 @@ errcodes cu_maxsteps(uint8_t _U_ par, int32_t _U_ *val){ errcodes cu_mcut(uint8_t par, int32_t *val){ NOPARCHK(par); - float f = getMCUtemp(); - *val = (uint32_t)(f*10.f); + getMCUtemp(); + *val = getMCUtemp(); return ERR_OK; } errcodes cu_mcuvdd(uint8_t par, int32_t *val){ NOPARCHK(par); - float f = getVdd(); - *val = (uint32_t)(f*10.f); + *val = getVdd(); return ERR_OK; } @@ -241,7 +254,7 @@ errcodes cu_microsteps(uint8_t _U_ par, int32_t _U_ *val){ #if MICROSTEPSMAX > 512 #error "Change the code anywhere!" #endif - uint16_t m = (uint16_t)*val; + uint16_t m = (uint16_t)*val, old = the_conf.microsteps[n]; if(m < 1 || m > MICROSTEPSMAX) return ERR_BADVAL; // find most significant bit if(m != 1<drvtype == DRVTYPE_UART){ if(!pdnuart_microsteps(n, m)) return ERR_CANTRUN; } - update_stepper(n); + if(!update_stepper(n)){ + the_conf.microsteps[n] = old; + return ERR_CANTRUN; + } } *val = the_conf.microsteps[n]; return ERR_OK; @@ -259,13 +275,18 @@ errcodes cu_microsteps(uint8_t _U_ par, int32_t _U_ *val){ errcodes cu_minspeed(uint8_t _U_ par, int32_t _U_ *val){ uint8_t n; CHECKN(n, par); + errcodes ret = ERR_OK; if(ISSETTER(par)){ if(*val >= the_conf.maxspd[n] || *val < 0) return ERR_BADVAL; + uint16_t minspd = the_conf.minspd[n]; the_conf.minspd[n] = getSPD(n, *val); - update_stepper(n); + if(!update_stepper(n)){ + the_conf.minspd[n] = minspd; + ret = ERR_CANTRUN; + } } *val = the_conf.minspd[n]; - return ERR_OK; + return ret; } errcodes cu_motcurrent(uint8_t par, int32_t *val){ @@ -284,12 +305,17 @@ errcodes cu_motcurrent(uint8_t par, int32_t *val){ errcodes cu_motflags(uint8_t _U_ par, int32_t _U_ *val){ uint8_t n; CHECKN(n, par); + errcodes ret = ERR_OK; if(ISSETTER(par)){ + motflags_t flags = the_conf.motflags[n]; the_conf.motflags[n] = *((motflags_t*)val); - update_stepper(n); + if(!update_stepper(n)){ + the_conf.motflags[n] = flags; + ret = ERR_CANTRUN; + } } *(motflags_t*)val = the_conf.motflags[n]; - return ERR_OK; + return ret; } errcodes cu_motno(uint8_t _U_ par, int32_t _U_ *val){ @@ -370,7 +396,7 @@ errcodes cu_stop(uint8_t _U_ par, int32_t _U_ *val){ return ERR_OK; } -static errcodes cu_time(uint8_t par, int32_t *val){ +errcodes cu_time(uint8_t par, int32_t *val){ NOPARCHK(par); *val = Tms; return ERR_OK; @@ -391,15 +417,13 @@ errcodes cu_usartstatus(uint8_t _U_ par, int32_t _U_ *val){ // V*10 errcodes cu_vdrive(uint8_t par, int32_t _U_ *val){ NOPARCHK(par); - float v = getADCvoltage(ADC_VDRIVE)*1000.f; - *val = (int32_t)v; + *val = getADCvoltage(ADC_VDRIVE); return ERR_OK; } errcodes cu_vfive(uint8_t par, int32_t *val){ NOPARCHK(par); - float v = getADCvoltage(ADC_VFIVE)*200.f; - *val = (int32_t)v; + *val = getADCvoltage(ADC_VFIVE) * 2; return ERR_OK; } @@ -475,7 +499,7 @@ const char* cancmds[CCMD_AMOUNT] = { [CCMD_RELPOS] = "relpos", [CCMD_RELSLOW] = "relslow", [CCMD_EMERGSTOP] = "emstop N", - [CCMD_EMERGSTOPALL] = "emstop", + [CCMD_EMERGSTOPALL] = "emstop all", [CCMD_STOP] = "stop", [CCMD_REINITMOTORS] = "motreinit", [CCMD_MOTORSTATE] = "state", diff --git a/F3:F303/Multistepper/commonproto.h b/F3:F303/Multistepper/commonproto.h index 0b369bb..40c6672 100644 --- a/F3:F303/Multistepper/commonproto.h +++ b/F3:F303/Multistepper/commonproto.h @@ -140,6 +140,7 @@ errcodes cu_screen(uint8_t par, int32_t *val); errcodes cu_speedlimit(uint8_t par, int32_t *val); errcodes cu_state(uint8_t par, int32_t *val); errcodes cu_stop(uint8_t par, int32_t *val); +errcodes cu_time(uint8_t par, int32_t *val); errcodes cu_tmcbus(uint8_t par, int32_t *val); errcodes cu_udata(uint8_t par, int32_t *val); errcodes cu_usartstatus(uint8_t par, int32_t *val); diff --git a/F3:F303/Multistepper/hashgen/hashgen.c b/F3:F303/Multistepper/hashgen/hashgen.c index d303007..a708d39 100644 --- a/F3:F303/Multistepper/hashgen/hashgen.c +++ b/F3:F303/Multistepper/hashgen/hashgen.c @@ -175,9 +175,7 @@ static const char *fhdr = int i = 0;\n\ while(*str > '@' && i < CMD_MAXLEN){ cmd[i++] = *str++; }\n\ cmd[i] = 0;\n\ - if(*str){\n\ - while(*str <= ' ') ++str;\n\ - }\n\ + while(*str && *str <= ' ') ++str;\n\ char *args = (char*) str;\n\ uint32_t h = hashf(cmd);\n\ switch(h){\n\n" diff --git a/F3:F303/Multistepper/hashgen/hdr.c b/F3:F303/Multistepper/hashgen/hdr.c index 0f6e5bf..2d59d0f 100644 --- a/F3:F303/Multistepper/hashgen/hdr.c +++ b/F3:F303/Multistepper/hashgen/hdr.c @@ -8,6 +8,8 @@ #define WAL __attribute__ ((weak, alias ("__f1"))) #endif +char lastcmd[CMD_MAXLEN + 1]; + static int __f1(uint32_t _U_ h, char _U_ *a){return 1;} int fn_abspos(uint32_t _U_ hash, char _U_ *args) WAL; // "abspos" (3056382221) @@ -137,16 +139,13 @@ static uint32_t hashf(const char *str){ } int parsecmd(const char *str){ - char cmd[CMD_MAXLEN + 1]; if(!str || !*str) return RET_CMDNOTFOUND; int i = 0; - while(*str > '@' && i < CMD_MAXLEN){ cmd[i++] = *str++; } - cmd[i] = 0; - if(*str){ - while(*str <= ' ') ++str; - } + while(*str > '@' && i < CMD_MAXLEN){ lastcmd[i++] = *str++; } + lastcmd[i] = 0; + while(*str && *str <= ' ') ++str; char *args = (char*) str; - uint32_t h = hashf(cmd); + uint32_t h = hashf(lastcmd); switch(h){ case CMD_ABSPOS: diff --git a/F3:F303/Multistepper/hashgen/hdr.h b/F3:F303/Multistepper/hashgen/hdr.h index 872029f..202d42f 100644 --- a/F3:F303/Multistepper/hashgen/hdr.h +++ b/F3:F303/Multistepper/hashgen/hdr.h @@ -13,6 +13,8 @@ enum{ int parsecmd(const char *cmdwargs); +extern char lastcmd[]; + #define CMD_ABSPOS (3056382221) #define CMD_ACCEL (1490521981) #define CMD_ADC (2963026093) diff --git a/F3:F303/Multistepper/main.c b/F3:F303/Multistepper/main.c index 6fa117f..e76ddcb 100644 --- a/F3:F303/Multistepper/main.c +++ b/F3:F303/Multistepper/main.c @@ -42,9 +42,9 @@ int main(void){ StartHSI(); SysTick_Config((uint32_t)48000); // 1ms } + hw_setup(); // GPIO, ADC, timers, watchdog etc. USBPU_OFF(); // make a reconnection flashstorage_init(); - hw_setup(); // GPIO, ADC, timers, watchdog etc. init_steppers(); USB_setup(); CAN_setup(the_conf.CANspeed); @@ -60,7 +60,7 @@ int main(void){ LED_blink(); } CAN_proc(); - USB_proc(); + USB_proc(); // TODO: remove deprecated trash code! process_steppers(); if(CAN_get_status() == CAN_FIFO_OVERRUN){ USB_sendstr("CAN bus fifo overrun occured!\n"); diff --git a/F3:F303/Multistepper/multistepper.bin b/F3:F303/Multistepper/multistepper.bin index 2830ca3..f06205d 100755 Binary files a/F3:F303/Multistepper/multistepper.bin and b/F3:F303/Multistepper/multistepper.bin differ diff --git a/F3:F303/Multistepper/multistepper.creator.user b/F3:F303/Multistepper/multistepper.creator.user index aa79e75..c02f8ee 100644 --- a/F3:F303/Multistepper/multistepper.creator.user +++ b/F3:F303/Multistepper/multistepper.creator.user @@ -1,14 +1,14 @@ - + EnvironmentId - {7bd84e39-ca37-46d3-be9d-99ebea85bc0d} + {cf63021e-ef53-49b0-b03b-2f2570cdf3b6} ProjectExplorer.Project.ActiveTarget - 0 + 0 ProjectExplorer.Project.EditorSettings @@ -28,7 +28,7 @@ QmlJSGlobal - 2 + 2 KOI8-R false 4 @@ -37,10 +37,11 @@ true true 1 + 0 false - true + false false - 0 + 1 true true 0 @@ -49,11 +50,12 @@ false 1 true - false + true true *.md, *.MD, Makefile - false + true true + true @@ -74,7 +76,8 @@ true true Builtin.DefaultTidyAndClazy - 2 + 4 + true @@ -88,12 +91,12 @@ Desktop Desktop Desktop - {65a14f9e-e008-4c1b-89df-4eaa4774b6e3} - 0 - 0 - 0 + {91347f2c-5221-46a7-80b1-0a054ca02f79} + 0 + 0 + 0 - /Big/Data/00__Electronics/STM32/F303-nolib/blink + /home/eddy/Docs/SAO/ELECTRONICS/STM32/F3-srcs/Multistepper @@ -102,7 +105,7 @@ true GenericProjectManager.GenericMakeStep - 1 + 1 Сборка Сборка ProjectExplorer.BuildSteps.Build @@ -115,7 +118,7 @@ true GenericProjectManager.GenericMakeStep - 1 + 1 Очистка Очистка ProjectExplorer.BuildSteps.Clean @@ -125,13 +128,13 @@ false - Default + По умолчанию GenericProjectManager.GenericBuildConfiguration - 1 + 1 - 0 + 0 Развёртывание Развёртывание ProjectExplorer.BuildSteps.Deploy @@ -141,24 +144,31 @@ false ProjectExplorer.DefaultDeployConfiguration - 1 + 1 + true + true + 0 + true + 2 + false + -e cpu-cycles --call-graph dwarf,4096 -F 250 + ProjectExplorer.CustomExecutableRunConfiguration - false + false true - false true - 1 + 1 ProjectExplorer.Project.TargetCount - 1 + 1 ProjectExplorer.Project.Updater.FileVersion diff --git a/F3:F303/Multistepper/pdnuart.c b/F3:F303/Multistepper/pdnuart.c index c1e5686..9d33110 100644 --- a/F3:F303/Multistepper/pdnuart.c +++ b/F3:F303/Multistepper/pdnuart.c @@ -169,7 +169,7 @@ int pdnuart_microsteps(uint8_t no, uint32_t val){ return writeregister(no, TMC2209Reg_CHOPCONF, regval.value); } -// init driver number `no` +// init driver number `no`, return FALSE if failed int pdnuart_init(uint8_t no){ TMC2209_gconf_reg_t gconf; if(!readregister(no, TMC2209Reg_GCONF, &gconf.value)) return FALSE; diff --git a/F3:F303/Multistepper/proto.c b/F3:F303/Multistepper/proto.c index d79191b..34b9317 100644 --- a/F3:F303/Multistepper/proto.c +++ b/F3:F303/Multistepper/proto.c @@ -309,11 +309,8 @@ int fn_cansend(uint32_t _U_ hash, char *args){ int fn_canfloodt(uint32_t _U_ hash, char *args){ uint32_t N; const char *n = getnum(args, &N); - if(args == n){ - USB_sendstr("floodT="); printu(floodT); USB_putbyte('\n'); - return RET_GOOD; - } - floodT = N; + if(args != n) floodT = N; + USB_sendstr("canfloodT="); printu(floodT); USB_putbyte('\n'); return RET_GOOD; } @@ -396,14 +393,6 @@ int fn_reset(uint32_t _U_ hash, char _U_ *args){ // "reset" (1907803304) return RET_GOOD; } -int fn_time(uint32_t _U_ hash, char _U_ *args){ // "time" (19148340) - USB_sendstr("Time (ms): "); - printu(Tms); - USB_putbyte('\n'); - return RET_GOOD; -} - - static const char* motfl[MOTFLAGS_AMOUNT] = { "0: reverse - invert motor's rotation", "1: [reserved]", @@ -433,12 +422,12 @@ int fn_dumpmotflags(uint32_t _U_ hash, char _U_ *args){ // "dumpmotflags" (3615 } static const char* errtxt[ERR_AMOUNT] = { - [ERR_OK] = "all OK", - [ERR_BADPAR] = "wrong parameter's value", - [ERR_BADVAL] = "wrong setter of parameter", - [ERR_WRONGLEN] = "bad message length", - [ERR_BADCMD] = "unknown command", - [ERR_CANTRUN] = "temporary can't run given command", + [ERR_OK] = "OK", + [ERR_BADPAR] = "BADPAR", + [ERR_BADVAL] = "BADVAL", + [ERR_WRONGLEN] = "WRONGLEN", + [ERR_BADCMD] = "BADCMD", + [ERR_CANTRUN] = "CANTRUN", }; int fn_dumperr(uint32_t _U_ hash, char _U_ *args){ // "dumperr" (1223989764) USND("Error codes:"); @@ -490,9 +479,11 @@ static int canusb_function(uint32_t hash, char *args){ uint32_t N; int32_t val = 0; uint8_t par = CANMESG_NOPAR; - float f; - USB_sendstr("CMD: hash="); printu(hash); USB_sendstr(", args="); + DBG("CMD: hash="); +#ifdef EBUG + printu(hash); USB_sendstr(", args="); USND(args); +#endif if(*args){ const char *n = getnum(args, &N); if(n != args){ // get parameter @@ -511,29 +502,17 @@ static int canusb_function(uint32_t hash, char *args){ } } } +#ifdef EBUG USB_sendstr("par="); printuhex(par); USB_sendstr(", val="); printi(val); newline(); +#endif switch(hash){ case CMD_ADC: - par = PARBASE(par); - if(par >= NUMBER_OF_ADC_CHANNELS){ - USB_sendstr("Wrong channel number\n"); - return RET_BAD; - } - USB_sendstr("ADC"); USB_putbyte('0'+par); - USB_putbyte('='); USB_sendstr(u2str(getADCval(par))); - f = getADCvoltage(par); - USB_sendstr("\nADCv");USB_putbyte('0'+par); - USB_putbyte('='); USB_sendstr(float2str(f, 2)); - newline(); - return RET_GOOD; + e = cu_adc(par, &val); break; case CMD_BUTTON: e = cu_button(par, &val); - if(val == CANMESG_NOPAR){ - USB_sendstr("Wrong button number\n"); - return RET_BAD; - } + if(val == CANMESG_NOPAR) break; // no button number const char *kstate = "none"; switch(e){ case EVT_PRESS: @@ -548,9 +527,9 @@ static int canusb_function(uint32_t hash, char *args){ default: break; } - USB_sendstr("KEY"); USB_putbyte('0'+PARBASE(par)); + USB_sendstr("button"); USB_putbyte('0'+PARBASE(par)); USB_putbyte('='); USB_sendstr(kstate); - USB_sendstr("\nKEYTIME="); USB_sendstr(u2str(val)); + USB_sendstr("\nbuttontm="); USB_sendstr(u2str(val)); newline(); return RET_GOOD; break; @@ -597,18 +576,10 @@ static int canusb_function(uint32_t hash, char *args){ e = cu_maxsteps(par, &val); break; case CMD_MCUT: - f = getMCUtemp(); - USB_sendstr("T="); - USB_sendstr(float2str(f, 1)); - newline(); - return RET_GOOD; + e = cu_mcut(par, &val); break; case CMD_MCUVDD: - f = getVdd(); - USB_sendstr("VDD="); - USB_sendstr(float2str(f, 1)); - newline(); - return RET_GOOD; + e = cu_mcuvdd(par, &val); break; case CMD_MICROSTEPS: e = cu_microsteps(par, &val); @@ -658,6 +629,9 @@ static int canusb_function(uint32_t hash, char *args){ case CMD_STOP: e = cu_stop(par, &val); break; + case CMD_TIME: + e = cu_time(par, &val); + break; case CMD_TMCBUS: e = cu_tmcbus(par, &val); break; @@ -683,7 +657,7 @@ static int canusb_function(uint32_t hash, char *args){ if(ERR_OK != e){ USB_sendstr(errtxt[e]); newline(); }else{ - USB_sendstr("OK par"); + USB_sendstr(lastcmd); if(PARBASE(par) != CANMESG_NOPAR) printu(PARBASE(par)); USB_putbyte('='); printi(val); newline(); @@ -728,6 +702,7 @@ int fn_screen(uint32_t _U_ hash, char _U_ *args) AL; //* "screen" (2100809349) int fn_speedlimit(uint32_t _U_ hash, char _U_ *args) AL; //* "speedlimit" (1654184245) int fn_state(uint32_t _U_ hash, char _U_ *args) AL; //* "state" (2216628902) int fn_stop(uint32_t _U_ hash, char _U_ *args) AL; //* "stop" (17184971) +int fn_time(uint32_t _U_ hash, char _U_ *args) AL; // "time" (19148340) int fn_tmcbus(uint32_t _U_ hash, char _U_ *args) AL; //* "tmcbus" (1906135955) int fn_udata(uint32_t _U_ hash, char _U_ *args) AL; //* "udata" (2736127636) int fn_usartstatus(uint32_t _U_ hash, char _U_ *args) AL; //* "usartstatus" (4007098968) diff --git a/F3:F303/Multistepper/steppers.c b/F3:F303/Multistepper/steppers.c index da82221..9ae0aca 100644 --- a/F3:F303/Multistepper/steppers.c +++ b/F3:F303/Multistepper/steppers.c @@ -78,18 +78,19 @@ TRUE_INLINE void recalcARR(int i){ } // update stepper's settings -void update_stepper(uint8_t i){ - if(i >= MOTORSNO) return; +int update_stepper(uint8_t i){ + if(i >= MOTORSNO) return FALSE; accdecsteps[i] = (the_conf.maxspd[i] * the_conf.maxspd[i]) / the_conf.accel[i] / 2; ustepsshift[i] = MSB(the_conf.microsteps[i]); ESW_reaction[i] = the_conf.ESW_reaction[i]; switch(the_conf.motflags[i].drvtype){ case DRVTYPE_UART: - pdnuart_init(i); + return pdnuart_init(i); break; default: break; } + return TRUE; } // run this function after each steppers parameters changing diff --git a/F3:F303/Multistepper/steppers.h b/F3:F303/Multistepper/steppers.h index 0ae3e81..0c44f76 100644 --- a/F3:F303/Multistepper/steppers.h +++ b/F3:F303/Multistepper/steppers.h @@ -53,7 +53,7 @@ enum{ void addmicrostep(uint8_t i); void init_steppers(); -void update_stepper(uint8_t i); +int update_stepper(uint8_t i); errcodes setmotpos(uint8_t i, int32_t position); errcodes getpos(uint8_t i, int32_t *position); diff --git a/F3:F303/Multistepper/version.inc b/F3:F303/Multistepper/version.inc index 84585f2..a6f8163 100644 --- a/F3:F303/Multistepper/version.inc +++ b/F3:F303/Multistepper/version.inc @@ -1,2 +1,2 @@ -#define BUILD_NUMBER "107" +#define BUILD_NUMBER "114" #define BUILD_DATE "2024-08-15"