You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
442 B
20 lines
442 B
void update_inputs(void) {
|
|
//analogRead()
|
|
static int inc = 1;
|
|
#if 1
|
|
if (inc > 0) {
|
|
if (Channel_data[THROTTLE] < CHANNEL_MIN_125 + 100) {
|
|
Channel_data[THROTTLE] += 1;
|
|
}else {
|
|
inc = -1;
|
|
}
|
|
}else {
|
|
if (Channel_data[THROTTLE] > CHANNEL_MIN_125) {
|
|
Channel_data[THROTTLE] -= 1;
|
|
}else {
|
|
inc = +1;
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
|