Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 5:2530bd8d8f7d
- Parent:
- 4:e0b1d06c5cc5
- Child:
- 7:d11eb8f1a02e
--- a/main.cpp Mon May 24 15:50:26 2021 +0000 +++ b/main.cpp Mon May 24 10:02:33 2021 -0600 @@ -10,7 +10,7 @@ */ #include "mbed.h" -#include "stm32f0xx_hal_iwdg.h" +#include "stm32f0xx_hal_iwdg.h" #include "BufferedSerial.h" #include "myPinout.hpp" #include "f_basicas.hpp" @@ -24,8 +24,8 @@ /** CONFIGURACIÓN DE INTERFACES ***************************************** */ Serial pcusb(USBTX, USBRX); Serial gv300(GV300_TX, GV300_RX); -BufferedSerial rf_id(LIDAR_TX, LIDAR_RX); -BufferedSerial lidar(RF_ID_TX, RF_ID_RX); +BufferedSerial rf_id(RF_ID_TX, RF_ID_RX); +BufferedSerial lidar(LIDAR_TX, LIDAR_RX); InterruptIn mybutton(USER_BUTTON); DigitalOut myled(LED1); BusOut display_H(A_HOUR, B_HOUR, C_HOUR, D_HOUR, E_HOUR, F_HOUR, G_HOUR); @@ -119,8 +119,10 @@ memset(buffer_antena_ID, '\0', sizeof buffer_antena_ID); mybutton.fall(&pressed); - ticker_funcionando.attach(&funcionando, 1.0); + ticker_funcionando.attach(&funcionando, 2.0); ticker_heartbeat.attach(&tx_skytrack, TIME_HEARTBEAT); + ticker_query_LiDAR.attach(&do_querryLIDAR, 2.0); + booting_gtdat(&pcusb, &gv300); // Enviar notificación de inicio lidar.write(TFMINIPLUS_UPDATE_RATE,6); flush_uart_rx(&lidar); @@ -137,9 +139,7 @@ HAL_IWDG_Init(&my_iwdg); booting_gtdat(&pcusb, &gv300); - while (true) { - if (do_test) { do_test = false; HAL_IWDG_Refresh(&my_iwdg);