Remove sequential, add rev limiter, battery, many other things

This commit is contained in:
Steve Howes
2018-09-13 20:24:47 +01:00
parent ad2f798089
commit 913692694f
13 changed files with 224 additions and 89 deletions
+6 -6
View File
@@ -1,20 +1,20 @@
void map_init()
{
task_map_run();
Serial.print("MAP: ");
Serial.print(map_current_value);
if(map_current_value < 87)
Serial.println(" (ERROR: Low)");
Serial.println("ERR: MAP low");
else if(map_current_value > 108)
Serial.println(" (ERROR: High)");
Serial.println("ERR: MAP high ");
else
Serial.println(" (OK)");
Serial.println("INF: MAP ok");
}
void task_map_run()
{
map_current_value = map(analogRead(A3), 0, 1023, map_sensor_min_kpa, map_sensor_max_kpa);
map_current_value = map(analogRead(pin_map), 0, 1023, map_sensor_min_kpa, map_sensor_max_kpa);
map_current_index = map(map_current_value, map_range_min, map_range_max, 0, 15);
map_current_index = constrain(map_current_index,0,15);
}