Pass all Setup() and Loop() methods into Arduino setup() and loop() functions.

This commit is contained in:
Matt McWilliams 2024-02-03 16:35:29 -05:00
parent ffbbb7c3ce
commit bf48f52333
3 changed files with 16 additions and 2 deletions

View File

@ -99,4 +99,8 @@ void ContactPrinter::RampTakeup(uint16_t start, uint16_t end, uint16_t time) {
bool ContactPrinter::IsRunning () { bool ContactPrinter::IsRunning () {
return running; return running;
}
void ContactPrinter::Loop () {
drive_motor.Loop();
} }

View File

@ -24,3 +24,7 @@ void EncoderMotor::Setup () {
digitalWrite(forward_pin, LOW); digitalWrite(forward_pin, LOW);
digitalWrite(backward_pin, LOW); digitalWrite(backward_pin, LOW);
} }
void EncoderMotor::Loop () {
}

View File

@ -1,4 +1,10 @@
#include "ContactPrinter.h"; #include "ContactPrinter.h";
void setup () {} ContactPrinter contact_printer;
void loop () {}
void setup () {
contact_printer.Setup();
}
void loop () {
contact_printer.Loop();
}