This commit is contained in:
rusEfi 2019-08-17 17:33:44 -04:00
parent 0821e46606
commit 6c9d684dfd
4 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -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();
}

View File

@ -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,