MRE etb
This commit is contained in:
parent
0821e46606
commit
6c9d684dfd
|
@ -102,7 +102,8 @@ static void setupEtb() {
|
|||
#endif /* EFI_FSIO */
|
||||
|
||||
|
||||
// EFI_ADC_7: "31 - AN volt 3"
|
||||
// set_analog_input_pin pps PA7
|
||||
// EFI_ADC_7: "31 - AN volt 3" - PA7
|
||||
// engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_7;
|
||||
|
||||
// Unused
|
||||
|
|
|
@ -778,6 +778,7 @@ static void setTriggerSimulatorPin(const char *indexStr, const char *pinName) {
|
|||
}
|
||||
|
||||
#if HAL_USE_ADC
|
||||
// set_analog_input_pin pps
|
||||
static void setAnalogInputPin(const char *sensorStr, const char *pinName) {
|
||||
brain_pin_e pin = parseBrainPin(pinName);
|
||||
if (pin == GPIO_INVALID) {
|
||||
|
@ -792,6 +793,9 @@ static void setAnalogInputPin(const char *sensorStr, const char *pinName) {
|
|||
if (strEqual("map", sensorStr)) {
|
||||
engineConfiguration->map.sensor.hwChannel = channel;
|
||||
scheduleMsg(&logger, "setting MAP to %s/%d", pinName, channel);
|
||||
} else if (strEqual("pps", sensorStr)) {
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = channel;
|
||||
scheduleMsg(&logger, "setting PPS to %s/%d", pinName, channel);
|
||||
} else if (strEqual("clt", sensorStr)) {
|
||||
engineConfiguration->clt.adcChannel = channel;
|
||||
scheduleMsg(&logger, "setting CLT to %s/%d", pinName, channel);
|
||||
|
|
|
@ -155,9 +155,9 @@ void rebootNow(void) {
|
|||
* Once day we will write graceful shutdown, but that would be one day.
|
||||
*/
|
||||
static void scheduleReboot(void) {
|
||||
scheduleMsg(&sharedLogger, "Rebooting in 5 seconds...");
|
||||
scheduleMsg(&sharedLogger, "Rebooting in 3 seconds...");
|
||||
lockAnyContext();
|
||||
chVTSetI(&resetTimer, TIME_MS2I(5000), (vtfunc_t) rebootNow, NULL);
|
||||
chVTSetI(&resetTimer, TIME_MS2I(3000), (vtfunc_t) rebootNow, NULL);
|
||||
unlockAnyContext();
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ void Pid::sleep() {
|
|||
}
|
||||
|
||||
void Pid::showPidStatus(Logging *logging, const char*msg) {
|
||||
scheduleMsg(logging, "%s settings: offset=%d P=%.5f I=%.5f D=%.5f dT=%d",
|
||||
scheduleMsg(logging, "%s settings: offset=%d P=%.5f I=%.5f D=%.5f period=%dms",
|
||||
msg,
|
||||
pid->offset,
|
||||
pid->pFactor,
|
||||
|
|
Loading…
Reference in New Issue