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.
main.cpp@2:0de4854743f7, 2021-06-10 (annotated)
- Committer:
- _seminahn
- Date:
- Thu Jun 10 01:23:00 2021 +0000
- Revision:
- 2:0de4854743f7
- Parent:
- 1:2594a70c1ddd
- Child:
- 3:a4677501ae87
v1.1.0 change ssr logic
Who changed what in which revision?
| User | Revision | Line number | New 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 | 2:0de4854743f7 | 7 | * @date 2021.06.09 |
| _seminahn | 2:0de4854743f7 | 8 | * @version 1.1.0 |
| _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 | 2:0de4854743f7 | 15 | */ |
| _seminahn | 2:0de4854743f7 | 16 | |
| _seminahn | 2:0de4854743f7 | 17 | #include "mbedHeader.hpp" |
| _seminahn | 2:0de4854743f7 | 18 | #include "robotConfig.h" |
| _seminahn | 2:0de4854743f7 | 19 | #include "rosHeader.hpp" |
| _seminahn | 2:0de4854743f7 | 20 | #include "moduleHeader.hpp" |
| _seminahn | 2:0de4854743f7 | 21 | #include "defineHeader.h" |
| _seminahn | 2:0de4854743f7 | 22 | #include "instanceHeader.hpp" |
| _seminahn | 2:0de4854743f7 | 23 | #include "myUtil.hpp" |
| _seminahn | 2:0de4854743f7 | 24 | #include "globalVariable.h" |
| _seminahn | 2:0de4854743f7 | 25 | #include "initFunction.hpp" |
| _seminahn | 2:0de4854743f7 | 26 | #include "threadDeclaration.hpp" |
| _seminahn | 2:0de4854743f7 | 27 | #include "callbackHeader.hpp" |
| _seminahn | 2:0de4854743f7 | 28 | |
| _seminahn | 2:0de4854743f7 | 29 | /* function protopytes begin ------------------------------------------------ */ |
| _seminahn | 2:0de4854743f7 | 30 | |
| _seminahn | 2:0de4854743f7 | 31 | /* function protopytes end -------------------------------------------------- */ |
| _seminahn | 2:0de4854743f7 | 32 | |
| _seminahn | 2:0de4854743f7 | 33 | |
| _seminahn | 2:0de4854743f7 | 34 | /* Instancs begin ----------------------------------------------------------- */ |
| _seminahn | 2:0de4854743f7 | 35 | #ifdef NO_ROS |
| _seminahn | 2:0de4854743f7 | 36 | mbed::Serial pc(USBTX, USBRX); |
| _seminahn | 2:0de4854743f7 | 37 | #else |
| _seminahn | 2:0de4854743f7 | 38 | ros::NodeHandle nh; |
| _seminahn | 2:0de4854743f7 | 39 | #endif |
| _seminahn | 2:0de4854743f7 | 40 | |
| _seminahn | 2:0de4854743f7 | 41 | Serial bt(BT_TX,BT_RX); |
| _seminahn | 2:0de4854743f7 | 42 | #define CALIBRATION_MODE 1 |
| _seminahn | 2:0de4854743f7 | 43 | /* Instancs end ------------------------------------------------------------- */ |
| _seminahn | 2:0de4854743f7 | 44 | int main() { |
| _seminahn | 2:0de4854743f7 | 45 | SystemCoreClockUpdate(); |
| _seminahn | 2:0de4854743f7 | 46 | #if (NO_ROS) |
| _seminahn | 2:0de4854743f7 | 47 | initSerial(); |
| _seminahn | 2:0de4854743f7 | 48 | //pc.printf("- Start of Program. CPU SystemCoreClock is %d Hz\r\n", SystemCoreClock); |
| _seminahn | 2:0de4854743f7 | 49 | #else |
| _seminahn | 2:0de4854743f7 | 50 | initROS(); |
| _seminahn | 2:0de4854743f7 | 51 | #endif |
| _seminahn | 2:0de4854743f7 | 52 | initBT(); |
| _seminahn | 2:0de4854743f7 | 53 | initThread(); |
| _seminahn | 2:0de4854743f7 | 54 | while(1) {;} |
| _seminahn | 2:0de4854743f7 | 55 | #if (NO_ROS) |
| _seminahn | 2:0de4854743f7 | 56 | pc.printf("- End of Program\r\n"); |
| _seminahn | 2:0de4854743f7 | 57 | #endif |
| _seminahn | 2:0de4854743f7 | 58 | return 0; |
| _seminahn | 2:0de4854743f7 | 59 | } |
| _seminahn | 2:0de4854743f7 | 60 | |
| _seminahn | 2:0de4854743f7 | 61 | /***** EOF *****/ |