semin ahn / Mbed OS zeta_stm_kinetic

Dependencies:   BufferedSerial

Committer:
_seminahn
Date:
Tue Nov 30 08:13:05 2021 +0000
Revision:
3:a4677501ae87
Parent:
2:0de4854743f7
v1.2.5, change imu freq

Who changed what in which revision?

UserRevisionLine numberNew contents of line
_seminahn 2:0de4854743f7 1 /** mbed Microcontroller Library
_seminahn 2:0de4854743f7 2 * Copyright (c) 2019 ARM Limited
_seminahn 2:0de4854743f7 3 * SPDX-License-Identifier: Apache-2.0
_seminahn 2:0de4854743f7 4 *
_seminahn 2:0de4854743f7 5 * @file
_seminahn 2:0de4854743f7 6 * @author Ahn semin <asm5206@gmail.com>
_seminahn 3:a4677501ae87 7 * @date 2021.08.17
_seminahn 3:a4677501ae87 8 * @version 1.2.1
_seminahn 2:0de4854743f7 9 *
_seminahn 2:0de4854743f7 10 * @section DESCRIPTION
_seminahn 2:0de4854743f7 11 *
_seminahn 2:0de4854743f7 12 * Control board
_seminahn 2:0de4854743f7 13 * 2021.06.09 Ahn: V1.1.0, Add delay on ssr control sequence
_seminahn 2:0de4854743f7 14 * SSR logic change npn
_seminahn 3:a4677501ae87 15 * 2021.07.19 Ahn: V1.1.0b, add relay off in finish state
_seminahn 3:a4677501ae87 16 * 2021.07.20 Ahn: V1.2.0c, remove bt receive loginfo
_seminahn 3:a4677501ae87 17 * 2021.07.27 Ahn: V1.1.0e, Compatible to various robot types
_seminahn 3:a4677501ae87 18 * 2021.07.29 Ahn: V1.2.0, Add satety lidar warining ignorance pin
_seminahn 3:a4677501ae87 19 * 2021.08.09 Ahn: V1.2.1, Change baudrate to 115200 & add Emergency for ModelI
_seminahn 3:a4677501ae87 20 nightly, Fix SSR control(too many relay off occurs imu data discontinuity)
_seminahn 3:a4677501ae87 21 * 2021.08.19 Ahn: V1.2.2, fix imu data discontinuity during autocharge state
_seminahn 3:a4677501ae87 22 * 2021.10.08 Ahn: V1.2.4, Add some pins for model I ( scrubber control )
_seminahn 2:0de4854743f7 23 */
_seminahn 2:0de4854743f7 24
_seminahn 3:a4677501ae87 25 #include "src/mbedHeader.hpp"
_seminahn 3:a4677501ae87 26 #include "configurations/robotConfig.h"
_seminahn 3:a4677501ae87 27 #include "src/rosHeader.hpp"
_seminahn 3:a4677501ae87 28 #include "src/moduleHeader.hpp"
_seminahn 3:a4677501ae87 29 #include "variables/defineHeader.h"
_seminahn 3:a4677501ae87 30 #include "variables/instanceHeader.hpp"
_seminahn 3:a4677501ae87 31 #include "src/myUtil.hpp"
_seminahn 3:a4677501ae87 32 #include "variables/globalVariable.h"
_seminahn 3:a4677501ae87 33 #include "src/initFunction.hpp"
_seminahn 3:a4677501ae87 34 #include "src/threadDeclaration.hpp"
_seminahn 3:a4677501ae87 35 #include "src/callbackHeader.hpp"
_seminahn 3:a4677501ae87 36 #include "configurations/robotConfig.h"
_seminahn 2:0de4854743f7 37
_seminahn 2:0de4854743f7 38 /* function protopytes begin ------------------------------------------------ */
_seminahn 2:0de4854743f7 39
_seminahn 2:0de4854743f7 40 /* function protopytes end -------------------------------------------------- */
_seminahn 2:0de4854743f7 41
_seminahn 2:0de4854743f7 42
_seminahn 2:0de4854743f7 43 /* Instancs begin ----------------------------------------------------------- */
_seminahn 2:0de4854743f7 44 #ifdef NO_ROS
_seminahn 3:a4677501ae87 45 mbed::Serial pc(USBTX, USBRX); // maybe after systemcoreclockupdate???
_seminahn 2:0de4854743f7 46 #else
_seminahn 2:0de4854743f7 47 ros::NodeHandle nh;
_seminahn 2:0de4854743f7 48 #endif
_seminahn 2:0de4854743f7 49
_seminahn 2:0de4854743f7 50 Serial bt(BT_TX,BT_RX);
_seminahn 2:0de4854743f7 51 /* Instancs end ------------------------------------------------------------- */
_seminahn 2:0de4854743f7 52 int main() {
_seminahn 2:0de4854743f7 53 SystemCoreClockUpdate();
_seminahn 2:0de4854743f7 54 #if (NO_ROS)
_seminahn 2:0de4854743f7 55 initSerial();
_seminahn 2:0de4854743f7 56 //pc.printf("- Start of Program. CPU SystemCoreClock is %d Hz\r\n", SystemCoreClock);
_seminahn 2:0de4854743f7 57 #else
_seminahn 2:0de4854743f7 58 initROS();
_seminahn 2:0de4854743f7 59 #endif
_seminahn 2:0de4854743f7 60 initBT();
_seminahn 2:0de4854743f7 61 initThread();
_seminahn 2:0de4854743f7 62 while(1) {;}
_seminahn 2:0de4854743f7 63 #if (NO_ROS)
_seminahn 2:0de4854743f7 64 pc.printf("- End of Program\r\n");
_seminahn 2:0de4854743f7 65 #endif
_seminahn 2:0de4854743f7 66 return 0;
_seminahn 2:0de4854743f7 67 }
_seminahn 2:0de4854743f7 68
_seminahn 3:a4677501ae87 69 /***** EOF *****/