mirror of
https://github.com/stevenhowes/MX5-Arduino.git
synced 2026-05-27 00:03:37 +01:00
TPS read and tidy up
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
void throttle_init()
|
||||
{
|
||||
task_throttle_run();
|
||||
}
|
||||
|
||||
void task_throttle_run()
|
||||
{
|
||||
throttle_previous_2_value = throttle_previous_1_value;
|
||||
throttle_previous_1_value = throttle_current_value;
|
||||
throttle_current_value = map(analogRead(pin_throttle), 0, 1023, 0, 100);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user