TPS read and tidy up

This commit is contained in:
Steve Howes
2018-09-14 18:33:36 +01:00
parent 437a2cc9a5
commit b0d2f98594
7 changed files with 85 additions and 52 deletions
+13
View File
@@ -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);
}