#include "Config.h"
void setup() {
Serial.begin(115200);
setupInput();
setupSteer();
setupThrottle();
}
void loop() {
int8_t* input = processInput();
validateInput(input);
updateMovement(input);
delay(DELAY);
}
void validateInput(int8_t* input) {
if (!isThrottleAllowed()) {
input[0] = 0;
}
}
void updateMovement(int8_t* input) {
updateThrottle(input[0]);
updateSteer(input[1]);
}