Handle float moves and check the number of arguments
DeltaStage sends moves commands as floats which led to occasional hard crashes, this avoids it. Incorrect number of arguments to move commands is now handled gracefully and this will later be extended to more commands.
This commit is contained in:
parent
767f86b683
commit
59b5ae50a4
4 changed files with 71 additions and 14 deletions
|
|
@ -40,6 +40,11 @@ inline bool read_eeprom_bool(uint16_t address, bool default_value)
|
|||
|
||||
const Command end_command = END_COMMAND;
|
||||
uint8_t parse_arguments(char ** arguments, String, uint8_t);
|
||||
bool assert_exact_args(uint8_t parsed, uint8_t num_args);
|
||||
|
||||
void print_arg_difference(uint8_t parsed, uint8_t expected);
|
||||
void free_parsed_arguments(char** arguments, uint8_t parsed);
|
||||
|
||||
extern void register_module(const Command commands[], void (*loop_fn)(void));
|
||||
|
||||
void get_version(String);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue