diff --git a/lib/Espfc/src/Cli.h b/lib/Espfc/src/Cli.h index 618aff3..593df4f 100644 --- a/lib/Espfc/src/Cli.h +++ b/lib/Espfc/src/Cli.h @@ -307,8 +307,8 @@ class Cli if(args[3]) ac.ch = String(args[3]).toInt(); if(args[4]) ac.min = String(args[4]).toInt(); if(args[5]) ac.max = String(args[5]).toInt(); - if(args[6]) ac.max = String(args[6]).toInt(); - if(args[7]) ac.max = String(args[7]).toInt(); + if(args[6]) ac.logicMode = String(args[6]).toInt(); + if(args[7]) ac.linkId = String(args[7]).toInt(); } void write(MixerEntry& ac, const char ** args) const @@ -713,9 +713,11 @@ class Cli Param(PSTR("blackbox_rate"), &c.blackboxPdenom), Param(PSTR("blackbox_mask"), &c.blackboxFieldsDisabledMask), + Param(PSTR("model_name"), PARAM_STRING, &c.modelName[0], NULL, MODEL_NAME_LEN), + #ifdef ESPFC_SERIAL_SOFT_0_WIFI - Param(PSTR("wifi_ssid"), PARAM_STRING, &c.wireless.ssid[0], NULL, 32), - Param(PSTR("wifi_pass"), PARAM_STRING, &c.wireless.pass[0], NULL, 32), + Param(PSTR("wifi_ssid"), PARAM_STRING, &c.wireless.ssid[0], NULL, WirelessConfig::MAX_LEN), + Param(PSTR("wifi_pass"), PARAM_STRING, &c.wireless.pass[0], NULL, WirelessConfig::MAX_LEN), Param(PSTR("wifi_tcp_port"), &c.wireless.port), #endif @@ -989,10 +991,12 @@ class Cli //s.print(F("# ")); //printVersion(s); //s.println(); + s.println(F("defaults")); for(size_t i = 0; _params[i].name; ++i) { print(_params[i], s); } + s.println(F("save")); } else if(strcmp_P(cmd.args[0], PSTR("cal")) == 0) { @@ -1122,7 +1126,8 @@ class Cli else if(strcmp_P(cmd.args[0], PSTR("save")) == 0) { _model.save(); - s.println(F("OK")); + s.println(F("# Saved, type reboot to apply changes")); + s.println(); } else if(strcmp_P(cmd.args[0], PSTR("eeprom")) == 0) { diff --git a/lib/Espfc/src/Control/Pid.h b/lib/Espfc/src/Control/Pid.h index 465cf87..d0facf7 100644 --- a/lib/Espfc/src/Control/Pid.h +++ b/lib/Espfc/src/Control/Pid.h @@ -12,7 +12,7 @@ #define PTERM_SCALE (PTERM_SCALE_BETAFLIGHT * RAD_TO_DEG * 0.001f) // ~ 0.00183 = 0.032029f * 57.29 / 1000 #define ITERM_SCALE (ITERM_SCALE_BETAFLIGHT * RAD_TO_DEG * 0.001f) // ~ 0.014f #define DTERM_SCALE (DTERM_SCALE_BETAFLIGHT * RAD_TO_DEG * 0.001f) // ~ 0.0000303f -#define FTERM_SCALE (FTERM_SCALE_BETAFLIGHT * RAD_TO_DEG * 0.001f) // +#define FTERM_SCALE (FTERM_SCALE_BETAFLIGHT * RAD_TO_DEG * 0.001f) // ~ 0.00000788f #define LEVEL_PTERM_SCALE 0.1f // 1/10 #define LEVEL_ITERM_SCALE 0.1f // 1/10 diff --git a/lib/Espfc/src/ModelConfig.h b/lib/Espfc/src/ModelConfig.h index 5906df7..b25ba03 100644 --- a/lib/Espfc/src/ModelConfig.h +++ b/lib/Espfc/src/ModelConfig.h @@ -864,7 +864,7 @@ class ModelConfig pid[FC_PID_ROLL] = { .P = 42, .I = 85, .D = 24, .F = 72 }; pid[FC_PID_PITCH] = { .P = 46, .I = 90, .D = 26, .F = 76 }; pid[FC_PID_YAW] = { .P = 45, .I = 90, .D = 0, .F = 72 }; - pid[FC_PID_LEVEL] = { .P = 55, .I = 0, .D = 0, .F = 0 }; + pid[FC_PID_LEVEL] = { .P = 45, .I = 0, .D = 0, .F = 0 }; pid[FC_PID_ALT] = { .P = 0, .I = 0, .D = 0, .F = 0 }; pid[FC_PID_POS] = { .P = 0, .I = 0, .D = 0, .F = 0 }; // POSHOLD_P * 100, POSHOLD_I * 100, @@ -896,6 +896,8 @@ class ModelConfig conditions[i].ch = AXIS_AUX_1 + 0; conditions[i].min = 900; conditions[i].max = 900; + conditions[i].logicMode = 0; + conditions[i].linkId = 0; } // actuator config - pid scaling