Started main.cpp init
This commit is contained in:
38
src/main.cpp
38
src/main.cpp
@@ -1,18 +1,34 @@
|
|||||||
#include <Arduino.h>
|
#include "flags.h"
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include "modules/lcd/lcd.h"
|
||||||
|
#include "modules/gps/gps.h"
|
||||||
|
#include "modules/logger/system_logger.h"
|
||||||
|
|
||||||
|
|
||||||
|
system_logger *logger_output = new system_logger(&Serial);
|
||||||
|
|
||||||
|
lcd *driver_display = new lcd();
|
||||||
|
gps *gps_module = new gps(&Serial2, logger_output);
|
||||||
|
|
||||||
// put function declarations here:
|
|
||||||
int myFunction(int, int);
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// put your setup code here, to run once:
|
driver_display->init();
|
||||||
int result = myFunction(2, 3);
|
driver_display->print_message("Starting Initialization");
|
||||||
|
delay(1000);
|
||||||
|
|
||||||
|
driver_display->print_message("Serial Init...");
|
||||||
|
Serial.begin(115200);
|
||||||
|
delay(500);
|
||||||
|
driver_display->print_message("Serial Init Complete");
|
||||||
|
delay(500);
|
||||||
|
|
||||||
|
driver_display->print_message("GPS Init...");
|
||||||
|
gps_module->init();
|
||||||
|
delay(500);
|
||||||
|
driver_display->print_message("GPS Init Complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
// put your main code here, to run repeatedly:
|
gps_module->parse_task(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
// put function definitions here:
|
|
||||||
int myFunction(int x, int y) {
|
|
||||||
return x + y;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user