2018-12-29 21:14:26 -07:00
|
|
|
#include <esp_log.h>
|
2018-12-21 09:20:30 -08:00
|
|
|
#include <string.h>
|
2018-12-29 21:14:26 -07:00
|
|
|
#include <u8g2.h>
|
2018-12-21 09:20:30 -08:00
|
|
|
|
2019-01-17 22:34:34 -08:00
|
|
|
#include "ugv_comms.hh"
|
2019-01-24 18:47:42 -08:00
|
|
|
#include "ugv_display.hh"
|
2019-01-17 19:34:13 -08:00
|
|
|
#include "ugv_io.hh"
|
|
|
|
|
|
|
|
namespace ugv {
|
|
|
|
|
2019-01-17 22:34:34 -08:00
|
|
|
using ugv::comms::Comms;
|
2019-01-17 23:15:07 -08:00
|
|
|
using ugv::io::IO;
|
2018-12-16 18:12:21 -08:00
|
|
|
|
2019-01-24 18:47:42 -08:00
|
|
|
DisplayClass *display;
|
2018-12-16 18:12:21 -08:00
|
|
|
|
2019-01-24 18:47:42 -08:00
|
|
|
static const char *TAG = "ugv_main";
|
2018-12-20 19:26:59 -08:00
|
|
|
|
2018-12-29 21:14:26 -07:00
|
|
|
void setup(void) {
|
2018-12-20 19:26:59 -08:00
|
|
|
ESP_LOGI(TAG, "setup");
|
|
|
|
|
2019-01-17 22:34:34 -08:00
|
|
|
Comms.Init();
|
2019-01-17 19:34:13 -08:00
|
|
|
IO.Init();
|
2019-01-24 18:47:42 -08:00
|
|
|
display = new DisplayClass(&Comms, &IO);
|
|
|
|
display->Init();
|
2018-12-21 09:20:30 -08:00
|
|
|
}
|
2018-12-20 19:26:59 -08:00
|
|
|
|
2019-01-17 19:34:13 -08:00
|
|
|
} // namespace ugv
|
|
|
|
|
2019-01-15 18:04:16 -08:00
|
|
|
extern "C" void app_main() {
|
2019-01-24 18:47:42 -08:00
|
|
|
ugv::setup();
|
2018-12-31 01:40:41 -07:00
|
|
|
}
|