semin ahn / Mbed OS zeta_stm_kinetic

Dependencies:   BufferedSerial

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

Go to the documentation of this file.
00001 /** mbed Microcontroller Library
00002  * Copyright (c) 2019 ARM Limited
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * @file    
00006  * @author  Ahn semin <asm5206@gmail.com>
00007  * @date    2021.08.17
00008  * @version 1.2.1
00009  *
00010  * @section DESCRIPTION
00011  * 
00012  * Control board
00013  * 2021.06.09 Ahn: V1.1.0, Add delay on ssr control sequence
00014  *                  SSR logic change npn
00015  * 2021.07.19 Ahn: V1.1.0b, add relay off in finish state
00016  * 2021.07.20 Ahn: V1.2.0c, remove bt receive loginfo
00017  * 2021.07.27 Ahn: V1.1.0e, Compatible to various robot types
00018  * 2021.07.29 Ahn: V1.2.0, Add satety lidar warining ignorance pin
00019  * 2021.08.09 Ahn: V1.2.1, Change baudrate to 115200 & add Emergency for ModelI
00020                     nightly, Fix SSR control(too many relay off occurs imu data discontinuity)
00021  * 2021.08.19 Ahn: V1.2.2, fix imu data discontinuity during autocharge state
00022  * 2021.10.08 Ahn: V1.2.4, Add some pins for model I ( scrubber control )
00023  */
00024 
00025 #include "src/mbedHeader.hpp"
00026 #include "configurations/robotConfig.h"
00027 #include "src/rosHeader.hpp"
00028 #include "src/moduleHeader.hpp"
00029 #include "variables/defineHeader.h"
00030 #include "variables/instanceHeader.hpp"
00031 #include "src/myUtil.hpp"
00032 #include "variables/globalVariable.h"
00033 #include "src/initFunction.hpp"
00034 #include "src/threadDeclaration.hpp"
00035 #include "src/callbackHeader.hpp"
00036 #include "configurations/robotConfig.h"
00037 
00038 /* function protopytes begin ------------------------------------------------ */
00039 
00040 /* function protopytes end -------------------------------------------------- */
00041 
00042 
00043 /* Instancs begin ----------------------------------------------------------- */
00044 #ifdef NO_ROS
00045 mbed::Serial pc(USBTX, USBRX); // maybe after systemcoreclockupdate???
00046 #else
00047 ros::NodeHandle nh;
00048 #endif
00049 
00050 Serial bt(BT_TX,BT_RX);
00051 /* Instancs end ------------------------------------------------------------- */
00052 int main() {
00053     SystemCoreClockUpdate();
00054 #if (NO_ROS)
00055     initSerial();
00056     //pc.printf("- Start of Program. CPU SystemCoreClock is %d Hz\r\n", SystemCoreClock);
00057 #else
00058     initROS();
00059 #endif
00060     initBT();
00061     initThread();   
00062     while(1) {;}
00063 #if (NO_ROS)
00064     pc.printf("- End of Program\r\n");
00065 #endif
00066     return 0;
00067 }
00068 
00069 /***** EOF *****/