some compatibility fixes and upload instructions
This commit is contained in:
parent
35d969aadd
commit
edd0246cc5
6 changed files with 43 additions and 7 deletions
27
src/main.cpp
27
src/main.cpp
|
|
@ -44,6 +44,7 @@ uint8_t registered_loop_fn_count = 0;
|
|||
|
||||
const Command core_commands[] = {
|
||||
{"version", get_version},
|
||||
{"list_modules", get_modules},
|
||||
END_COMMAND};
|
||||
|
||||
void register_module(const Command commands[], void (*loop_fn)(void))
|
||||
|
|
@ -95,10 +96,34 @@ uint8_t parse_arguments(char ** arguments, String command, uint8_t max_args)
|
|||
|
||||
void get_version(String)
|
||||
{
|
||||
Serial.println(F(VER_STRING));
|
||||
Serial.println(F(VERSION_STRING));
|
||||
return;
|
||||
}
|
||||
|
||||
void get_modules(String)
|
||||
{
|
||||
#if defined(LIGHTSENSOR) && defined(LIGHT_SENSOR_ADAFRUIT_TSL2591)
|
||||
Serial.println(F("Light Sensor: TSL2591"));
|
||||
#elif defined(LIGHTSENSOR) && defined(LIGHT_SENSOR_ADAFRUIT_ADS1115)
|
||||
Serial.println(F("Light Sensor: ADS1115"));
|
||||
#endif
|
||||
|
||||
#if defined(ENDSTOPS)
|
||||
Serial.print("Endstops:");
|
||||
#ifdef ENDSTOPS_MIN
|
||||
Serial.print(" min");
|
||||
#endif
|
||||
#ifdef ENDSTOPS_MAX
|
||||
Serial.print(" max");
|
||||
#endif
|
||||
#ifdef ENDSTOPS_SOFT
|
||||
Serial.print(" soft");
|
||||
#endif
|
||||
Serial.println();
|
||||
#endif
|
||||
Serial.println("--END--");
|
||||
}
|
||||
|
||||
#ifndef UNIT_TEST
|
||||
void setup()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue