mirror of
https://github.com/stevenhowes/MX5-Arduino.git
synced 2026-05-26 15:53:40 +01:00
Remove sequential, add rev limiter, battery, many other things
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user