@@ -29,35 +29,6 @@ MowerService mower_service{3};
2929ImuService imu_service{4 };
3030PowerService power_service{5 };
3131
32- xbot::driver::gps::UbxGpsInterface gps{};
33-
34- THD_WORKING_AREA (testWa, 100 );
35- void testThreadFunc (void * arg) {
36- (void )arg;
37- while (1 ) {
38- auto start = chVTGetSystemTime ();
39- while (chVTTimeElapsedSinceX (start) < TIME_MS2I (100 )) {
40-
41- }
42- chThdYield ();
43- }
44- }
45-
46-
47- int i = 0 ;
48- void gpsUpdated (const xbot::driver::gps::GpsDriver::GpsState &new_state) {
49- (void )new_state;
50- etl::string<100 > lat{};
51- etl::format_spec format{};
52- format.width (8 ).fill (' ' ).precision (3 );
53- lat += " lat:" ;
54- etl::to_string (new_state.pos_lat , lat, format, true );
55- lat += " lon:" ;
56- etl::to_string (new_state.pos_lon , lat, format, true );
57-
58- SEGGER_RTT_printf (0 , " got data: %s!\n " , lat.c_str ());
59- i++;
60- }
6132/*
6233 * Application entry point.
6334 */
@@ -124,11 +95,6 @@ int main(void) {
12495 diff_drive.start ();
12596 mower_service.start ();
12697
127- // chThdCreateStatic(testWa, sizeof(testWa), NORMALPRIO, testThreadFunc, NULL);
128- gps.SetStateCallback (etl::delegate<void (const xbot::driver::gps::GpsDriver::GpsState &new_state)>::create<gpsUpdated>());
129- gps.SetDatum (49.0 , 10.0 , 150 );
130- gps.StartDriver (&UARTD6, 921600 );
131-
13298 // Subscribe to global events and dispatch to our services
13399 event_listener_t event_listener;
134100 chEvtRegister (&mower_events, &event_listener, 1 );
0 commit comments