130 Commits
Author SHA1 Message Date
kleiax 479a3d171e added description and video to readme 2024-10-04 22:59:18 +00:00
kleiax a5bfbc3df9 added readme 2024-10-04 22:56:44 +00:00
kleiax 4251eda946 added pictures 2024-10-05 00:27:51 +02:00
kleiax 27a0a2ca7b fix ntrip client and integration 2024-08-17 10:44:42 +02:00
kleiax 73fde34e48 - fix ntripClient
- fix gyroscope
- fix init screen
2024-07-19 12:15:44 +02:00
kleiax 87743c8e67 refactoring ntripClient 2024-07-12 22:57:37 +02:00
kleiax c866bc0d60 little optical fix 2024-07-03 12:51:42 +02:00
kleiax dbb646b5a5 start implementation of routeCache 2024-07-03 09:22:16 +02:00
kleiax dd304cf787 - new implementation for course and distance calculation 2024-07-03 09:05:06 +02:00
kleiax 717daef21e add new todo 2024-04-09 21:37:32 +02:00
kleiax 16e04afebd fix copy paste mistake 2024-04-09 21:31:54 +02:00
kleiax f227a2f569 WiFi for Aschendorf 2024-04-05 14:02:17 +02:00
kleiax 9b6889b68c - remove typo
- add menu to dependencies
2024-04-04 21:26:25 +02:00
kleiax 155975df33 Start working on Bachelor 2024-04-04 21:12:37 +02:00
kleiax 451517e7cd cleaning 2023-10-12 20:11:15 +02:00
kleiax 5eaeb2749b doxygen finished 2023-10-12 19:50:10 +02:00
kleiax db74898b72 documentation checked and edit
for all files in lib folder
2023-10-12 18:45:12 +02:00
kleiax 61a95e4601 update comments 1 2023-10-12 08:43:33 +02:00
kleiax a43e2db92b clangtidy corrections part 2 2023-10-12 00:44:27 +02:00
kleiax 23d854a826 clangtidy corrections part 1 2023-10-11 17:35:40 +02:00
kleiax 77a52b82c3 Merge branch 'main' of git.kleiax.de:kleiax/Projektarbeit-Rover 2023-10-11 11:46:12 +02:00
kleiax d9d3f63160 pointer as auto declaration 2023-10-11 11:41:21 +02:00
kleiax a00e8d6d03 fix pwm channel 2023-10-11 11:38:17 +02:00
kleiax f41cf5c6eb an update 2023-10-10 18:11:46 +02:00
kleiax 692adf7e16 - todos
- test driving
2023-10-10 17:06:30 +02:00
kleiax fd3155f49d added cppcheck 2023-10-04 09:22:54 +02:00
kleiax 45264c6481 finished speed and sensor menu in modes 2023-09-29 11:30:13 +02:00
kleiax d7357d4f95 try to make menus accessable from driveMode 2023-09-27 15:32:30 +02:00
kleiax 38e7db7dee - added batteryCalibration
- start with default Menus for DriveModes
2023-09-27 11:11:39 +02:00
kleiax e48f680fec quite some fixes 2023-09-23 22:47:07 +02:00
kleiax d0c5421ad9 - fix driveManager quit mode
- change com port
- edit todos
2023-09-23 16:38:34 +02:00
kleiax cebd44d793 fix esp now 2023-09-23 16:37:40 +02:00
kleiax baf1936824 network is now a component 2023-09-20 08:51:31 +02:00
kleiax 936d2b9647 todos 2023-09-17 11:27:23 +02:00
kleiax ae6e74507d todos 2023-09-14 21:54:52 +02:00
kleiax 6c82b9bc6c update todo 2023-09-12 20:51:41 +02:00
kleiax ad560e7d16 more sensorData menu 2023-09-10 13:00:12 +02:00
kleiax 7c8406f438 fix bugs in gyro implematation 2023-09-04 20:01:40 +02:00
kleiax 7c94c8cc56 implement gyroskop 2023-09-04 19:42:11 +02:00
kleiax 1d56a2a36d - battery calc now more efficent
- new battery values now every 0.5s
2023-09-04 15:52:34 +02:00
kleiax befbd898cc driveManager gets now the object 2023-09-04 15:25:56 +02:00
kleiax 6a76470f45 compilation works again 2023-09-04 13:30:34 +02:00
kleiax 5f650982a7 refactore 2023-09-03 12:36:16 +02:00
kleiax faaa3603a7 - reafctor 2023-09-03 12:36:08 +02:00
kleiax b6764e54da - broke nearly everthing
- create Sensor Manager
2023-09-02 18:30:33 +02:00
kleiax daeccf7288 delete useless stuff 2023-09-02 17:45:50 +02:00
kleiax 6a11690963 more todos 2023-09-02 17:45:31 +02:00
kleiax b038dbd837 simplify menus 2023-08-18 16:51:54 +02:00
kleiax a82b32087c remove most of the defines 2023-08-18 15:34:56 +02:00
kleiax 4cd2b9368d make all possible functions const 2023-08-18 11:44:10 +02:00
kleiax 11d21e2e89 cleaning
refactore
all components now have a base class compnent for loop functions
2023-08-18 10:47:35 +02:00
kleiax 25d37e3970 delete old debug menu entries 2023-08-14 15:28:41 +02:00
kleiax c7a19163ff autopilot inherits speed from manualControl
spelling
refactor
2023-08-14 15:28:21 +02:00
kleiax 99dc1709d8 fix speedometer no value for the conversion factor define 2023-08-14 15:27:20 +02:00
kleiax 1b9cf0d8a0 added max distance between points
spelling
2023-08-14 09:53:59 +02:00
kleiax 534629e2e9 fix speedometer buffer 2023-08-14 09:00:20 +02:00
kleiax 010544a35a spelling
circle mode for autopilot
menu entry for circle mode
2023-08-14 08:25:24 +02:00
kleiax 9adbdece7f clean up todo 2023-08-14 07:16:11 +02:00
kleiax bf4c1dd49f Merge branch 'main' of git.kleiax.de:kleiax/Projektarbeit-Rover into main 2023-08-14 07:15:26 +02:00
kleiax 147eea1f92 some code quality 2023-08-14 07:11:03 +02:00
kleiax bad84b1ef3 refactore and fixes
first route successfully absolved
2023-08-13 17:04:53 +02:00
kleiax 30e2b75ea6 added extra function for azimuth overflow 2023-08-13 17:03:19 +02:00
kleiax cd319f43e4 refactore motorControl 2023-08-13 13:42:22 +02:00
kleiax 1e15cf5d5d removed submodule structure 2023-08-13 11:04:19 +02:00
kleiax 2e0b7f7f8d no time for comment 2023-08-09 22:41:48 +02:00
kleiax 98f3cb93f0 calc Azimuth finished 2023-08-09 15:34:03 +02:00
kleiax cf111426bd courseCalculationTest 2023-08-09 15:32:55 +02:00
kleiax 57553b3cce fix cast error 2023-08-09 15:14:49 +02:00
kleiax a9f09960c4 init test framework 2023-08-09 14:37:56 +02:00
kleiax 984c1891e1 run callback in digatalControl only after rotation
finished
2023-08-09 14:37:22 +02:00
kleiax a00ee4080c moved class route in seperate folder 2023-08-09 14:33:51 +02:00
kleiax 6b8b56fc1a removed arduino dependency 2023-08-09 13:03:33 +02:00
kleiax bc79b2a4a6 increase buffersize and tiemout time for less
connection aborts
2023-08-09 10:11:07 +02:00
kleiax f236d98be2 - added calc azimuth to autopilot menu
- getters in navigation for calc azimuth
- wrapper for manualControl for automatic orintaion change
2023-08-08 22:59:28 +02:00
kleiax 620812b5f8 added interface for calced azimuth 2023-08-08 18:56:36 +02:00
kleiax 115da0f8a8 added digital control to manualControl 2023-08-08 14:48:15 +02:00
kleiax 4540966f87 fix auto increment script path 2023-08-08 12:49:17 +02:00
kleiax bbad210840 change submodul name for version increment 2023-08-08 12:05:42 +02:00
kleiax ebe4d32523 added magDec to manualDrive Menu 2023-08-07 23:25:31 +02:00
kleiax d6bc7e4239 change some things, because azimuth is now
by default a signed value
2023-08-07 21:41:03 +02:00
kleiax 47a6e770fe added version information to rover menu 2023-08-07 21:00:08 +02:00
kleiax c4d7afcdb7 added auto version increment 2023-08-07 20:38:44 +02:00
kleiax 8d437b35e8 clean up 2023-08-07 13:29:45 +02:00
kleiax 8ed91c4b11 small fixes 2023-08-07 13:05:42 +02:00
kleiax 3549af2470 update compass lib 2023-08-07 13:04:19 +02:00
kleiax b297a31b6b - added delete function for the api 2023-06-03 10:40:05 +02:00
kleiax 8796da97b5 - added wifi channel on boot screen
- added wifi to systeminformation
- added accuracy settings to capturee route and autopilot
- fix data loss in calibrate compass
- fix autopilot dont switch to ready for selfdriving
2023-06-02 22:30:21 +02:00
kleiax 38c8a58988 - added data validation in calibrate compass
- activatre auto load calibration data
- give possibility to force update in navigation getCourseCorrection
- added drive mode for compass calibration
- removed compass calibration manualControl
2023-05-31 12:48:41 +02:00
kleiax e0d6853961 reactivate mqtt output 2023-05-31 09:11:26 +02:00
kleiax 22eb6788c3 - remove NtripReconnect from Autopilot and CaptureRoute
- shiftet moveControl States in the class namespace
- added auto reconeect to NtripClient
- a lot of refactor
2023-05-30 23:40:05 +02:00
kleiax 98b65c4aec refactor autopilot 2023-05-25 19:59:16 +02:00
kleiax 1faab632d5 rotate correctionCourse in getCourseCorrection by
180°
2023-05-25 19:58:57 +02:00
kleiax 466ee39acc changed isBatteryLow function to check voltage
instead of percent
2023-05-25 19:57:00 +02:00
kleiax b9be10e063 added opertaor << and fix remove calibration 2023-05-25 17:10:42 +02:00
kleiax 49e0c2d1ef added increase and decrease to navigation 2023-05-24 14:47:59 +02:00
kleiax 52590e9e2f route return now the real last element of the list 2023-05-24 14:42:15 +02:00
kleiax 56f506e1b5 added increase and decrease for min distance
to autopilot menu
2023-05-24 13:49:14 +02:00
kleiax 6a2a437e21 fixed to fast switching between autopilot mode 2023-05-24 13:48:24 +02:00
kleiax 74d56576ae calibrateCompass namespace for preferences was to
long
2023-05-24 12:34:05 +02:00
kleiax 75b461237e load correction data for compass from flash 2023-05-24 11:42:03 +02:00
kleiax 1b25f59719 added possibility to save and load the data
from flash for compass calibration
2023-05-24 11:41:07 +02:00
kleiax 434f5a48c0 fix syntax error 2023-05-23 23:56:15 +02:00
kleiax 2c1aed89f1 included calibrateCompass to the manualDrive menu 2023-05-23 23:55:09 +02:00
kleiax 7e460e04b0 added getCompass to navigation class 2023-05-23 23:36:09 +02:00
kleiax 8199b47089 added a class to calibrate the compass 2023-05-23 23:24:38 +02:00
kleiax 7418adb027 saved status of freezing target point in the
autopilot menu
2023-05-23 23:24:16 +02:00
kleiax a6e35167d8 added credentials to menu system informations 2023-05-23 23:23:15 +02:00
kleiax 1844a2a12e fixed a bug that caused navigation not to stop 2023-05-23 23:22:27 +02:00
kleiax 3a2c5b90f8 added freeze target point 2023-05-23 21:01:27 +02:00
kleiax ca8d9bb963 added restart to autopilot menu and
disable autopilot by pressing the actionbutton
2023-05-23 20:39:47 +02:00
kleiax d4045dff4b removed compass corrections 2023-05-23 20:38:38 +02:00
kleiax c31755d293 changed pin numbers after fixing a loose contact 2023-05-23 20:38:14 +02:00
kleiax a310be0f6c added dutyCycle to menuManualControl 2023-05-22 22:10:54 +02:00
kleiax 77b7eeae92 run code counter 2023-05-11 23:25:53 +02:00
kleiax 68b7364cbe added possibility to change max speeds in
manualControl
2023-05-11 22:15:34 +02:00
kleiax ed39cdb874 refactore all captureRoute stuff 2023-05-11 21:07:21 +02:00
kleiax 6874aed6ed refactor all autopilot stuff 2023-05-11 19:37:57 +02:00
kleiax 8945e5eb21 remove duplication 2023-05-11 18:24:16 +02:00
kleiax 2850b5084d remove inheritance from menuTestMode 2023-05-11 11:04:55 +02:00
kleiax f2b63f1ce6 optimized navigation 2023-05-11 10:54:41 +02:00
kleiax 9b4017da9f Merge branch 'main'
of git.kleiax.de:kleiax/Projektarbeit-Rover
2023-05-11 10:54:00 +02:00
kleiax df6a4b5e92 integrated menuInformationsSites to
driveMenu items
2023-05-11 08:39:06 +02:00
kleiax ac53e46e22 fix: rover moved on after finished navigation 2023-04-27 13:41:13 +02:00
kleiax 01710ab2ae added configureonLeave, now its possible to reset
autopilot
2023-04-27 13:38:33 +02:00
kleiax 250fb6802b fix that a point with standard constructor
was valid
2023-04-27 13:35:41 +02:00
kleiax 8e5a47f65b added fixtype and carrier solution to gps menu 2023-04-27 12:15:06 +02:00
kleiax 06f88f9a00 some settings 2023-04-27 12:14:20 +02:00
kleiax 996390ccca some menu improvements 2023-04-26 15:56:34 +02:00
kleiax 00eed74f7d own gnss library cloned for spi pushRawData 2023-04-26 15:56:17 +02:00
kleiax c2048ae949 extend battery lib with messuared values and new
calculation
2023-04-26 15:55:34 +02:00
144 changed files with 9425 additions and 4875 deletions
@@ -0,0 +1,108 @@
# Details
Date : 2023-05-11 22:19:18
Directory d:\\Embedded\\Projektarbeit-Rover
Total : 93 files, 4871 codes, 2365 comments, 1394 blanks, all 8630 lines
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/details.md) | Markdown | 60 | 0 | 6 | 66 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff-details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff-details.md) | Markdown | 9 | 0 | 6 | 15 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff.md) | Markdown | 12 | 0 | 7 | 19 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.json](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.json) | JSON | 1 | 0 | 0 | 1 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.md) | Markdown | 39 | 0 | 7 | 46 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/details.md) | Markdown | 71 | 0 | 6 | 77 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff-details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff-details.md) | Markdown | 52 | 0 | 6 | 58 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff.md) | Markdown | 31 | 0 | 7 | 38 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.json](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.json) | JSON | 1 | 0 | 0 | 1 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.md) | Markdown | 44 | 0 | 7 | 51 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/details.md) | Markdown | 93 | 0 | 6 | 99 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff-details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff-details.md) | Markdown | 91 | 0 | 6 | 97 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff.md) | Markdown | 54 | 0 | 7 | 61 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.json](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.json) | JSON | 1 | 0 | 0 | 1 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.md) | Markdown | 57 | 0 | 7 | 64 |
| [Projektarbeit-Rover/debugMqtt/hw1/main.py](/Projektarbeit-Rover/debugMqtt/hw1/main.py) | Python | 14 | 2 | 10 | 26 |
| [Projektarbeit-Rover/debugMqtt/hw1/main_debug.py](/Projektarbeit-Rover/debugMqtt/hw1/main_debug.py) | Python | 12 | 2 | 10 | 24 |
| [Projektarbeit-Rover/debugMqtt/rhede/main.py](/Projektarbeit-Rover/debugMqtt/rhede/main.py) | Python | 16 | 2 | 10 | 28 |
| [Projektarbeit-Rover/debugMqtt/rhede/main_debug.py](/Projektarbeit-Rover/debugMqtt/rhede/main_debug.py) | Python | 13 | 2 | 10 | 25 |
| [Projektarbeit-Rover/include/config.h](/Projektarbeit-Rover/include/config.h) | C++ | 8 | 26 | 5 | 39 |
| [Projektarbeit-Rover/include/moveControl.h](/Projektarbeit-Rover/include/moveControl.h) | C++ | 58 | 130 | 28 | 216 |
| [Projektarbeit-Rover/include/moveControlConfig.h](/Projektarbeit-Rover/include/moveControlConfig.h) | C++ | 21 | 18 | 4 | 43 |
| [Projektarbeit-Rover/include/network.h](/Projektarbeit-Rover/include/network.h) | C++ | 33 | 56 | 16 | 105 |
| [Projektarbeit-Rover/include/networkConfig.h](/Projektarbeit-Rover/include/networkConfig.h) | C++ | 98 | 37 | 17 | 152 |
| [Projektarbeit-Rover/lib/Battery/battery.cpp](/Projektarbeit-Rover/lib/Battery/battery.cpp) | C++ | 107 | 13 | 22 | 142 |
| [Projektarbeit-Rover/lib/Battery/battery.h](/Projektarbeit-Rover/lib/Battery/battery.h) | C++ | 55 | 65 | 16 | 136 |
| [Projektarbeit-Rover/lib/ControllPad/controlPad.cpp](/Projektarbeit-Rover/lib/ControllPad/controlPad.cpp) | C++ | 56 | 10 | 15 | 81 |
| [Projektarbeit-Rover/lib/ControllPad/controlPad.h](/Projektarbeit-Rover/lib/ControllPad/controlPad.h) | C++ | 25 | 10 | 16 | 51 |
| [Projektarbeit-Rover/lib/ControllPad/controlPadInput.h](/Projektarbeit-Rover/lib/ControllPad/controlPadInput.h) | C++ | 50 | 10 | 15 | 75 |
| [Projektarbeit-Rover/lib/Counter/counter.cpp](/Projektarbeit-Rover/lib/Counter/counter.cpp) | C++ | 45 | 0 | 12 | 57 |
| [Projektarbeit-Rover/lib/Counter/counter.h](/Projektarbeit-Rover/lib/Counter/counter.h) | C++ | 21 | 0 | 10 | 31 |
| [Projektarbeit-Rover/lib/Illumination/underfloorLighting.cpp](/Projektarbeit-Rover/lib/Illumination/underfloorLighting.cpp) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/lib/Illumination/underfloorLighting.h](/Projektarbeit-Rover/lib/Illumination/underfloorLighting.h) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.cpp](/Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.cpp) | C++ | 45 | 10 | 12 | 67 |
| [Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.h](/Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.h) | C++ | 25 | 41 | 15 | 81 |
| [Projektarbeit-Rover/lib/MQTT/debugMqtt.cpp](/Projektarbeit-Rover/lib/MQTT/debugMqtt.cpp) | C++ | 81 | 12 | 17 | 110 |
| [Projektarbeit-Rover/lib/MQTT/debugMqtt.h](/Projektarbeit-Rover/lib/MQTT/debugMqtt.h) | C++ | 41 | 120 | 18 | 179 |
| [Projektarbeit-Rover/lib/MotorControl/motorControl.cpp](/Projektarbeit-Rover/lib/MotorControl/motorControl.cpp) | C++ | 142 | 24 | 35 | 201 |
| [Projektarbeit-Rover/lib/MotorControl/motorControl.h](/Projektarbeit-Rover/lib/MotorControl/motorControl.h) | C++ | 48 | 102 | 22 | 172 |
| [Projektarbeit-Rover/lib/Navigation/navigation.cpp](/Projektarbeit-Rover/lib/Navigation/navigation.cpp) | C++ | 192 | 29 | 47 | 268 |
| [Projektarbeit-Rover/lib/Navigation/navigation.h](/Projektarbeit-Rover/lib/Navigation/navigation.h) | C++ | 68 | 141 | 36 | 245 |
| [Projektarbeit-Rover/lib/Navigation/route.cpp](/Projektarbeit-Rover/lib/Navigation/route.cpp) | C++ | 125 | 22 | 34 | 181 |
| [Projektarbeit-Rover/lib/Navigation/route.h](/Projektarbeit-Rover/lib/Navigation/route.h) | C++ | 71 | 135 | 35 | 241 |
| [Projektarbeit-Rover/lib/NtripClient/ntripClient.cpp](/Projektarbeit-Rover/lib/NtripClient/ntripClient.cpp) | C++ | 198 | 23 | 46 | 267 |
| [Projektarbeit-Rover/lib/NtripClient/ntripClient.h](/Projektarbeit-Rover/lib/NtripClient/ntripClient.h) | C++ | 51 | 63 | 18 | 132 |
| [Projektarbeit-Rover/lib/Speedometer/speedometer.cpp](/Projektarbeit-Rover/lib/Speedometer/speedometer.cpp) | C++ | 109 | 18 | 32 | 159 |
| [Projektarbeit-Rover/lib/Speedometer/speedometer.h](/Projektarbeit-Rover/lib/Speedometer/speedometer.h) | C++ | 51 | 100 | 28 | 179 |
| [Projektarbeit-Rover/lib/Times/debugTimes.cpp](/Projektarbeit-Rover/lib/Times/debugTimes.cpp) | C++ | 28 | 10 | 9 | 47 |
| [Projektarbeit-Rover/lib/Times/debugTimes.h](/Projektarbeit-Rover/lib/Times/debugTimes.h) | C++ | 19 | 45 | 13 | 77 |
| [Projektarbeit-Rover/platformio.ini](/Projektarbeit-Rover/platformio.ini) | Ini | 26 | 9 | 5 | 40 |
| [Projektarbeit-Rover/src/OutputBuf/outputBuf.cpp](/Projektarbeit-Rover/src/OutputBuf/outputBuf.cpp) | C++ | 36 | 11 | 13 | 60 |
| [Projektarbeit-Rover/src/OutputBuf/outputBuf.h](/Projektarbeit-Rover/src/OutputBuf/outputBuf.h) | C++ | 24 | 48 | 14 | 86 |
| [Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.cpp](/Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.cpp) | C++ | 130 | 11 | 19 | 160 |
| [Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.h](/Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.h) | C++ | 17 | 19 | 8 | 44 |
| [Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.cpp](/Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.cpp) | C++ | 9 | 10 | 4 | 23 |
| [Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.h](/Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.h) | C++ | 13 | 19 | 8 | 40 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.cpp](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.cpp) | C++ | 197 | 13 | 55 | 265 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.h](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.h) | C++ | 52 | 83 | 22 | 157 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.cpp](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.cpp) | C++ | 54 | 12 | 11 | 77 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.h](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.h) | C++ | 15 | 27 | 9 | 51 |
| [Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformatio.cpp](/Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformatio.cpp) | C++ | 34 | 15 | 11 | 60 |
| [Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformation.h](/Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformation.h) | C++ | 14 | 21 | 8 | 43 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.cpp) | C++ | 122 | 10 | 24 | 156 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.h) | C++ | 14 | 31 | 9 | 54 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.cpp) | C++ | 47 | 10 | 13 | 70 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.h) | C++ | 13 | 31 | 8 | 52 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.cpp) | C++ | 58 | 10 | 16 | 84 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.h) | C++ | 14 | 27 | 8 | 49 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.cpp) | C++ | 183 | 20 | 40 | 243 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.h) | C++ | 48 | 36 | 16 | 100 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.cpp) | C++ | 54 | 10 | 16 | 80 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.h) | C++ | 20 | 34 | 11 | 65 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.cpp) | C++ | 16 | 10 | 5 | 31 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.h) | C++ | 15 | 25 | 8 | 48 |
| [Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.cpp](/Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.cpp) | C++ | 99 | 11 | 25 | 135 |
| [Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.h](/Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.h) | C++ | 46 | 68 | 18 | 132 |
| [Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilotConfig.h](/Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilotConfig.h) | C++ | 9 | 36 | 10 | 55 |
| [Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.cpp](/Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.cpp) | C++ | 63 | 10 | 14 | 87 |
| [Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.h](/Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.h) | C++ | 34 | 62 | 17 | 113 |
| [Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.cpp](/Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.cpp) | C++ | 1 | 10 | 3 | 14 |
| [Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.h](/Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.h) | C++ | 6 | 10 | 5 | 21 |
| [Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.cpp](/Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.cpp) | C++ | 26 | 15 | 8 | 49 |
| [Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.h](/Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.h) | C++ | 30 | 49 | 12 | 91 |
| [Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.cpp](/Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.cpp) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.h](/Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.h) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.cpp](/Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.cpp) | C++ | 115 | 14 | 27 | 156 |
| [Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.h](/Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.h) | C++ | 50 | 79 | 24 | 153 |
| [Projektarbeit-Rover/src/driveModi/driveManager.cpp](/Projektarbeit-Rover/src/driveModi/driveManager.cpp) | C++ | 64 | 14 | 21 | 99 |
| [Projektarbeit-Rover/src/driveModi/driveManager.h](/Projektarbeit-Rover/src/driveModi/driveManager.h) | C++ | 43 | 69 | 17 | 129 |
| [Projektarbeit-Rover/src/driveModi/driveModi.h](/Projektarbeit-Rover/src/driveModi/driveModi.h) | C++ | 9 | 22 | 5 | 36 |
| [Projektarbeit-Rover/src/main.cpp](/Projektarbeit-Rover/src/main.cpp) | C++ | 234 | 22 | 47 | 303 |
| [Projektarbeit-Rover/src/moveControl.cpp](/Projektarbeit-Rover/src/moveControl.cpp) | C++ | 162 | 27 | 39 | 228 |
| [Projektarbeit-Rover/src/network.cpp](/Projektarbeit-Rover/src/network.cpp) | C++ | 113 | 17 | 26 | 156 |
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -0,0 +1,192 @@
# Diff Details
Date : 2023-05-11 22:19:18
Directory d:\\Embedded\\Projektarbeit-Rover
Total : 177 files, 592 codes, 367 comments, 256 blanks, all 1215 lines
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\details.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-01-19_11-26-30%5Cdetails.md) | Markdown | -60 | 0 | -6 | -66 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-01-19_11-26-30%5Cdiff-details.md) | Markdown | -9 | 0 | -6 | -15 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-01-19_11-26-30%5Cdiff.md) | Markdown | -12 | 0 | -7 | -19 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.json](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-01-19_11-26-30%5Cresults.json) | JSON | -1 | 0 | 0 | -1 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-01-19_11-26-30%5Cresults.md) | Markdown | -39 | 0 | -7 | -46 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\details.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-02-01_10-50-06%5Cdetails.md) | Markdown | -71 | 0 | -6 | -77 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-02-01_10-50-06%5Cdiff-details.md) | Markdown | -52 | 0 | -6 | -58 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-02-01_10-50-06%5Cdiff.md) | Markdown | -31 | 0 | -7 | -38 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.json](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-02-01_10-50-06%5Cresults.json) | JSON | -1 | 0 | 0 | -1 |
| [c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.md](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5C.VSCodeCounter%5C2022-02-01_10-50-06%5Cresults.md) | Markdown | -44 | 0 | -7 | -51 |
| [c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main.py](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5CdebugMqtt%5Chw1%5Cmain.py) | Python | -14 | -2 | -10 | -26 |
| [c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main_debug.py](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5CdebugMqtt%5Chw1%5Cmain_debug.py) | Python | -12 | -2 | -10 | -24 |
| [c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main.py](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5CdebugMqtt%5Crhede%5Cmain.py) | Python | -16 | -2 | -10 | -28 |
| [c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main_debug.py](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5CdebugMqtt%5Crhede%5Cmain_debug.py) | Python | -13 | -2 | -10 | -25 |
| [c:\Users\alex1\git\projektarbeit\doc\Diagrams\classdiagramm.uxf](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cdoc%5CDiagrams%5Cclassdiagramm.uxf) | umlet | -142 | 0 | -15 | -157 |
| [c:\Users\alex1\git\projektarbeit\doc\Diagrams\statesAutopilot.uxf](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cdoc%5CDiagrams%5CstatesAutopilot.uxf) | umlet | -389 | 0 | -2 | -391 |
| [c:\Users\alex1\git\projektarbeit\include\config.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cinclude%5Cconfig.h) | C++ | -5 | -15 | -2 | -22 |
| [c:\Users\alex1\git\projektarbeit\include\moveControl.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cinclude%5CmoveControl.h) | C++ | -54 | -102 | -23 | -179 |
| [c:\Users\alex1\git\projektarbeit\include\moveControlConfig.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cinclude%5CmoveControlConfig.h) | C++ | -23 | -18 | -4 | -45 |
| [c:\Users\alex1\git\projektarbeit\include\network.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cinclude%5Cnetwork.h) | C++ | -25 | -56 | -14 | -95 |
| [c:\Users\alex1\git\projektarbeit\include\networkConfig.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cinclude%5CnetworkConfig.h) | C++ | -97 | -37 | -17 | -151 |
| [c:\Users\alex1\git\projektarbeit\lib\Battery\battery.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CBattery%5Cbattery.cpp) | C++ | -45 | -11 | -10 | -66 |
| [c:\Users\alex1\git\projektarbeit\lib\Battery\battery.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CBattery%5Cbattery.h) | C++ | -33 | -52 | -13 | -98 |
| [c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CIllumination%5CunderfloorLighting.cpp) | C++ | 0 | 0 | -1 | -1 |
| [c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CIllumination%5CunderfloorLighting.h) | C++ | 0 | 0 | -1 | -1 |
| [c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMQTT%5CdebugMqtt.cpp) | C++ | -81 | -12 | -17 | -110 |
| [c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMQTT%5CdebugMqtt.h) | C++ | -41 | -120 | -18 | -179 |
| [c:\Users\alex1\git\projektarbeit\lib\Menu\menu.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMenu%5Cmenu.cpp) | C++ | -106 | -11 | -19 | -136 |
| [c:\Users\alex1\git\projektarbeit\lib\Menu\menu.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMenu%5Cmenu.h) | C++ | -26 | -18 | -12 | -56 |
| [c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMenu%5CmenuAction.cpp) | C++ | -36 | -10 | -9 | -55 |
| [c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMenu%5CmenuAction.h) | C++ | -21 | -53 | -15 | -89 |
| [c:\Users\alex1\git\projektarbeit\lib\Menu\menuControl.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMenu%5CmenuControl.h) | C++ | -22 | -44 | -10 | -76 |
| [c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMenu%5CmenuIntInput.cpp) | C++ | -170 | -14 | -41 | -225 |
| [c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMenu%5CmenuIntInput.h) | C++ | -46 | -34 | -20 | -100 |
| [c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMotorControl%5CmotorControl.cpp) | C++ | -144 | -24 | -35 | -203 |
| [c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CMotorControl%5CmotorControl.h) | C++ | -47 | -102 | -22 | -171 |
| [c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CNavigation%5Cnavigation.cpp) | C++ | -178 | -28 | -40 | -246 |
| [c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CNavigation%5Cnavigation.h) | C++ | -53 | -119 | -29 | -201 |
| [c:\Users\alex1\git\projektarbeit\lib\Navigation\route.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CNavigation%5Croute.cpp) | C++ | -28 | -10 | -8 | -46 |
| [c:\Users\alex1\git\projektarbeit\lib\Navigation\route.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CNavigation%5Croute.h) | C++ | -34 | -74 | -20 | -128 |
| [c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CNtripClient%5CntripClient.cpp) | C++ | -186 | -22 | -42 | -250 |
| [c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CNtripClient%5CntripClient.h) | C++ | -50 | 0 | -16 | -66 |
| [c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CSpeedometer%5Cspeedometer.cpp) | C++ | -81 | -12 | -21 | -114 |
| [c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CSpeedometer%5Cspeedometer.h) | C++ | -35 | -68 | -22 | -125 |
| [c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CTimes%5CdebugTimes.cpp) | C++ | -28 | -10 | -9 | -47 |
| [c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Clib%5CTimes%5CdebugTimes.h) | C++ | -19 | -40 | -13 | -72 |
| [c:\Users\alex1\git\projektarbeit\platformio.ini](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Cplatformio.ini) | Ini | -19 | -9 | -3 | -31 |
| [c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5COutputBuf%5CoutputBuf.cpp) | C++ | -36 | -11 | -13 | -60 |
| [c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5COutputBuf%5CoutputBuf.h) | C++ | -24 | -32 | -12 | -68 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CAkku%5CmenuAkku.cpp) | C++ | -48 | -10 | -12 | -70 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CAkku%5CmenuAkku.h) | C++ | -22 | -31 | -12 | -65 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CGPS%5CmenuGPS.cpp) | C++ | -159 | -10 | -23 | -192 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CGPS%5CmenuGPS.h) | C++ | -28 | -47 | -18 | -93 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CPID%5CmenuPidSettings.cpp) | C++ | -65 | -10 | -19 | -94 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CPID%5CmenuPidSettings.h) | C++ | -23 | -43 | -16 | -82 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CAutopilot%5CmenuAutopilot.cpp) | C++ | -69 | -11 | -14 | -94 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CAutopilot%5CmenuAutopilot.h) | C++ | -16 | -31 | -10 | -57 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CCaptureRoute%5CmenuCaptureRoute.cpp) | C++ | -25 | -10 | -6 | -41 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CCaptureRoute%5CmenuCaptureRoute.h) | C++ | -14 | -31 | -8 | -53 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CManualDrive%5CmenuManualDrive.cpp) | C++ | -12 | -10 | -3 | -25 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CManualDrive%5CmenuManualDrive.h) | C++ | -9 | -27 | -6 | -42 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CTestMode%5CmenuTestMode.cpp) | C++ | -115 | -23 | -29 | -167 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CTestMode%5CmenuTestMode.h) | C++ | -37 | -10 | -11 | -58 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CmenuDriveMode.cpp) | C++ | -13 | -10 | -5 | -28 |
| [c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CSpecialMenus%5CdriveModi%5CmenuDriveMode.h) | C++ | -20 | -22 | -8 | -50 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CAutopilot%5Cautopilot.cpp) | C++ | -73 | -11 | -20 | -104 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CAutopilot%5Cautopilot.h) | C++ | -34 | -82 | -19 | -135 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilotConfig.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CAutopilot%5CautopilotConfig.h) | C++ | -9 | -36 | -10 | -55 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CCaptureRoute%5CcaptureRoute.cpp) | C++ | -29 | -10 | -7 | -46 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CCaptureRoute%5CcaptureRoute.h) | C++ | -21 | -51 | -13 | -85 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CConsolControl%5CconsolControl.cpp) | C++ | -1 | -10 | -3 | -14 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CConsolControl%5CconsolControl.h) | C++ | -6 | -10 | -5 | -21 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CManualControl%5CmanualControl.cpp) | C++ | -25 | -10 | -7 | -42 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CManualControl%5CmanualControl.h) | C++ | -22 | -49 | -12 | -83 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CRacing%5Cracing.cpp) | C++ | 0 | 0 | -1 | -1 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CRacing%5Cracing.h) | C++ | 0 | 0 | -1 | -1 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CTestMode%5CtestMode.cpp) | C++ | -99 | -14 | -28 | -141 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CModi%5CTestMode%5CtestMode.h) | C++ | -26 | -10 | -14 | -50 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CdriveManager.cpp) | C++ | -63 | -13 | -21 | -97 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CdriveManager.h) | C++ | -41 | -69 | -17 | -127 |
| [c:\Users\alex1\git\projektarbeit\src\driveModi\driveModi.h](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CdriveModi%5CdriveModi.h) | C++ | -10 | -22 | -6 | -38 |
| [c:\Users\alex1\git\projektarbeit\src\main.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5Cmain.cpp) | C++ | -227 | -38 | -43 | -308 |
| [c:\Users\alex1\git\projektarbeit\src\moveControl.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5CmoveControl.cpp) | C++ | -133 | -35 | -34 | -202 |
| [c:\Users\alex1\git\projektarbeit\src\network.cpp](/c:%5CUsers%5Calex1%5Cgit%5Cprojektarbeit%5Csrc%5Cnetwork.cpp) | C++ | -86 | -16 | -17 | -119 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/details.md) | Markdown | 60 | 0 | 6 | 66 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff-details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff-details.md) | Markdown | 9 | 0 | 6 | 15 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/diff.md) | Markdown | 12 | 0 | 7 | 19 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.json](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.json) | JSON | 1 | 0 | 0 | 1 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.md](/Projektarbeit-Rover/.VSCodeCounter/2022-01-19_11-26-30/results.md) | Markdown | 39 | 0 | 7 | 46 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/details.md) | Markdown | 71 | 0 | 6 | 77 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff-details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff-details.md) | Markdown | 52 | 0 | 6 | 58 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/diff.md) | Markdown | 31 | 0 | 7 | 38 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.json](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.json) | JSON | 1 | 0 | 0 | 1 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.md](/Projektarbeit-Rover/.VSCodeCounter/2022-02-01_10-50-06/results.md) | Markdown | 44 | 0 | 7 | 51 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/details.md) | Markdown | 93 | 0 | 6 | 99 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff-details.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff-details.md) | Markdown | 91 | 0 | 6 | 97 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/diff.md) | Markdown | 54 | 0 | 7 | 61 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.json](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.json) | JSON | 1 | 0 | 0 | 1 |
| [Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.md](/Projektarbeit-Rover/.VSCodeCounter/2022-12-09_11-39-58/results.md) | Markdown | 57 | 0 | 7 | 64 |
| [Projektarbeit-Rover/debugMqtt/hw1/main.py](/Projektarbeit-Rover/debugMqtt/hw1/main.py) | Python | 14 | 2 | 10 | 26 |
| [Projektarbeit-Rover/debugMqtt/hw1/main_debug.py](/Projektarbeit-Rover/debugMqtt/hw1/main_debug.py) | Python | 12 | 2 | 10 | 24 |
| [Projektarbeit-Rover/debugMqtt/rhede/main.py](/Projektarbeit-Rover/debugMqtt/rhede/main.py) | Python | 16 | 2 | 10 | 28 |
| [Projektarbeit-Rover/debugMqtt/rhede/main_debug.py](/Projektarbeit-Rover/debugMqtt/rhede/main_debug.py) | Python | 13 | 2 | 10 | 25 |
| [Projektarbeit-Rover/include/config.h](/Projektarbeit-Rover/include/config.h) | C++ | 8 | 26 | 5 | 39 |
| [Projektarbeit-Rover/include/moveControl.h](/Projektarbeit-Rover/include/moveControl.h) | C++ | 58 | 130 | 28 | 216 |
| [Projektarbeit-Rover/include/moveControlConfig.h](/Projektarbeit-Rover/include/moveControlConfig.h) | C++ | 21 | 18 | 4 | 43 |
| [Projektarbeit-Rover/include/network.h](/Projektarbeit-Rover/include/network.h) | C++ | 33 | 56 | 16 | 105 |
| [Projektarbeit-Rover/include/networkConfig.h](/Projektarbeit-Rover/include/networkConfig.h) | C++ | 98 | 37 | 17 | 152 |
| [Projektarbeit-Rover/lib/Battery/battery.cpp](/Projektarbeit-Rover/lib/Battery/battery.cpp) | C++ | 107 | 13 | 22 | 142 |
| [Projektarbeit-Rover/lib/Battery/battery.h](/Projektarbeit-Rover/lib/Battery/battery.h) | C++ | 55 | 65 | 16 | 136 |
| [Projektarbeit-Rover/lib/ControllPad/controlPad.cpp](/Projektarbeit-Rover/lib/ControllPad/controlPad.cpp) | C++ | 56 | 10 | 15 | 81 |
| [Projektarbeit-Rover/lib/ControllPad/controlPad.h](/Projektarbeit-Rover/lib/ControllPad/controlPad.h) | C++ | 25 | 10 | 16 | 51 |
| [Projektarbeit-Rover/lib/ControllPad/controlPadInput.h](/Projektarbeit-Rover/lib/ControllPad/controlPadInput.h) | C++ | 50 | 10 | 15 | 75 |
| [Projektarbeit-Rover/lib/Counter/counter.cpp](/Projektarbeit-Rover/lib/Counter/counter.cpp) | C++ | 45 | 0 | 12 | 57 |
| [Projektarbeit-Rover/lib/Counter/counter.h](/Projektarbeit-Rover/lib/Counter/counter.h) | C++ | 21 | 0 | 10 | 31 |
| [Projektarbeit-Rover/lib/Illumination/underfloorLighting.cpp](/Projektarbeit-Rover/lib/Illumination/underfloorLighting.cpp) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/lib/Illumination/underfloorLighting.h](/Projektarbeit-Rover/lib/Illumination/underfloorLighting.h) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.cpp](/Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.cpp) | C++ | 45 | 10 | 12 | 67 |
| [Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.h](/Projektarbeit-Rover/lib/LcdWrapper/LcdWrapper.h) | C++ | 25 | 41 | 15 | 81 |
| [Projektarbeit-Rover/lib/MQTT/debugMqtt.cpp](/Projektarbeit-Rover/lib/MQTT/debugMqtt.cpp) | C++ | 81 | 12 | 17 | 110 |
| [Projektarbeit-Rover/lib/MQTT/debugMqtt.h](/Projektarbeit-Rover/lib/MQTT/debugMqtt.h) | C++ | 41 | 120 | 18 | 179 |
| [Projektarbeit-Rover/lib/MotorControl/motorControl.cpp](/Projektarbeit-Rover/lib/MotorControl/motorControl.cpp) | C++ | 142 | 24 | 35 | 201 |
| [Projektarbeit-Rover/lib/MotorControl/motorControl.h](/Projektarbeit-Rover/lib/MotorControl/motorControl.h) | C++ | 48 | 102 | 22 | 172 |
| [Projektarbeit-Rover/lib/Navigation/navigation.cpp](/Projektarbeit-Rover/lib/Navigation/navigation.cpp) | C++ | 192 | 29 | 47 | 268 |
| [Projektarbeit-Rover/lib/Navigation/navigation.h](/Projektarbeit-Rover/lib/Navigation/navigation.h) | C++ | 68 | 141 | 36 | 245 |
| [Projektarbeit-Rover/lib/Navigation/route.cpp](/Projektarbeit-Rover/lib/Navigation/route.cpp) | C++ | 125 | 22 | 34 | 181 |
| [Projektarbeit-Rover/lib/Navigation/route.h](/Projektarbeit-Rover/lib/Navigation/route.h) | C++ | 71 | 135 | 35 | 241 |
| [Projektarbeit-Rover/lib/NtripClient/ntripClient.cpp](/Projektarbeit-Rover/lib/NtripClient/ntripClient.cpp) | C++ | 198 | 23 | 46 | 267 |
| [Projektarbeit-Rover/lib/NtripClient/ntripClient.h](/Projektarbeit-Rover/lib/NtripClient/ntripClient.h) | C++ | 51 | 63 | 18 | 132 |
| [Projektarbeit-Rover/lib/Speedometer/speedometer.cpp](/Projektarbeit-Rover/lib/Speedometer/speedometer.cpp) | C++ | 109 | 18 | 32 | 159 |
| [Projektarbeit-Rover/lib/Speedometer/speedometer.h](/Projektarbeit-Rover/lib/Speedometer/speedometer.h) | C++ | 51 | 100 | 28 | 179 |
| [Projektarbeit-Rover/lib/Times/debugTimes.cpp](/Projektarbeit-Rover/lib/Times/debugTimes.cpp) | C++ | 28 | 10 | 9 | 47 |
| [Projektarbeit-Rover/lib/Times/debugTimes.h](/Projektarbeit-Rover/lib/Times/debugTimes.h) | C++ | 19 | 45 | 13 | 77 |
| [Projektarbeit-Rover/platformio.ini](/Projektarbeit-Rover/platformio.ini) | Ini | 26 | 9 | 5 | 40 |
| [Projektarbeit-Rover/src/OutputBuf/outputBuf.cpp](/Projektarbeit-Rover/src/OutputBuf/outputBuf.cpp) | C++ | 36 | 11 | 13 | 60 |
| [Projektarbeit-Rover/src/OutputBuf/outputBuf.h](/Projektarbeit-Rover/src/OutputBuf/outputBuf.h) | C++ | 24 | 48 | 14 | 86 |
| [Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.cpp](/Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.cpp) | C++ | 130 | 11 | 19 | 160 |
| [Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.h](/Projektarbeit-Rover/src/SpecialMenus/GPS/menuGPS.h) | C++ | 17 | 19 | 8 | 44 |
| [Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.cpp](/Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.cpp) | C++ | 9 | 10 | 4 | 23 |
| [Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.h](/Projektarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.h) | C++ | 13 | 19 | 8 | 40 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.cpp](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.cpp) | C++ | 197 | 13 | 55 | 265 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.h](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoute.h) | C++ | 52 | 83 | 22 | 157 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.cpp](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.cpp) | C++ | 54 | 12 | 11 | 77 |
| [Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.h](/Projektarbeit-Rover/src/SpecialMenus/Route/menuRoutePoints.h) | C++ | 15 | 27 | 9 | 51 |
| [Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformatio.cpp](/Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformatio.cpp) | C++ | 34 | 15 | 11 | 60 |
| [Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformation.h](/Projektarbeit-Rover/src/SpecialMenus/Systeminformation/menuSysteminformation.h) | C++ | 14 | 21 | 8 | 43 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.cpp) | C++ | 122 | 10 | 24 | 156 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/Autopilot/menuAutopilot.h) | C++ | 14 | 31 | 9 | 54 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.cpp) | C++ | 47 | 10 | 13 | 70 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/CaptureRoute/menuCaptureRoute.h) | C++ | 13 | 31 | 8 | 52 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.cpp) | C++ | 58 | 10 | 16 | 84 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/ManualDrive/menuManualDrive.h) | C++ | 14 | 27 | 8 | 49 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.cpp) | C++ | 183 | 20 | 40 | 243 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/menuTestMode.h) | C++ | 48 | 36 | 16 | 100 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.cpp) | C++ | 54 | 10 | 16 | 80 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/TestMode/speedometerTest.h) | C++ | 20 | 34 | 11 | 65 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.cpp](/Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.cpp) | C++ | 16 | 10 | 5 | 31 |
| [Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.h](/Projektarbeit-Rover/src/SpecialMenus/driveModi/menuDriveMode.h) | C++ | 15 | 25 | 8 | 48 |
| [Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.cpp](/Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.cpp) | C++ | 99 | 11 | 25 | 135 |
| [Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.h](/Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilot.h) | C++ | 46 | 68 | 18 | 132 |
| [Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilotConfig.h](/Projektarbeit-Rover/src/driveModi/Modi/Autopilot/autopilotConfig.h) | C++ | 9 | 36 | 10 | 55 |
| [Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.cpp](/Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.cpp) | C++ | 63 | 10 | 14 | 87 |
| [Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.h](/Projektarbeit-Rover/src/driveModi/Modi/CaptureRoute/captureRoute.h) | C++ | 34 | 62 | 17 | 113 |
| [Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.cpp](/Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.cpp) | C++ | 1 | 10 | 3 | 14 |
| [Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.h](/Projektarbeit-Rover/src/driveModi/Modi/ConsolControl/consolControl.h) | C++ | 6 | 10 | 5 | 21 |
| [Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.cpp](/Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.cpp) | C++ | 26 | 15 | 8 | 49 |
| [Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.h](/Projektarbeit-Rover/src/driveModi/Modi/ManualControl/manualControl.h) | C++ | 30 | 49 | 12 | 91 |
| [Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.cpp](/Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.cpp) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.h](/Projektarbeit-Rover/src/driveModi/Modi/Racing/racing.h) | C++ | 0 | 0 | 1 | 1 |
| [Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.cpp](/Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.cpp) | C++ | 115 | 14 | 27 | 156 |
| [Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.h](/Projektarbeit-Rover/src/driveModi/Modi/TestMode/testMode.h) | C++ | 50 | 79 | 24 | 153 |
| [Projektarbeit-Rover/src/driveModi/driveManager.cpp](/Projektarbeit-Rover/src/driveModi/driveManager.cpp) | C++ | 64 | 14 | 21 | 99 |
| [Projektarbeit-Rover/src/driveModi/driveManager.h](/Projektarbeit-Rover/src/driveModi/driveManager.h) | C++ | 43 | 69 | 17 | 129 |
| [Projektarbeit-Rover/src/driveModi/driveModi.h](/Projektarbeit-Rover/src/driveModi/driveModi.h) | C++ | 9 | 22 | 5 | 36 |
| [Projektarbeit-Rover/src/main.cpp](/Projektarbeit-Rover/src/main.cpp) | C++ | 234 | 22 | 47 | 303 |
| [Projektarbeit-Rover/src/moveControl.cpp](/Projektarbeit-Rover/src/moveControl.cpp) | C++ | 162 | 27 | 39 | 228 |
| [Projektarbeit-Rover/src/network.cpp](/Projektarbeit-Rover/src/network.cpp) | C++ | 113 | 17 | 26 | 156 |
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
+179
View File
@@ -0,0 +1,179 @@
"filename", "language", "Ini", "C++", "Python", "Markdown", "JSON", "umlet", "comment", "blank", "total"
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\details.md", "Markdown", 0, 0, 0, -60, 0, 0, 0, -6, -66
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md", "Markdown", 0, 0, 0, -9, 0, 0, 0, -6, -15
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff.md", "Markdown", 0, 0, 0, -12, 0, 0, 0, -7, -19
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.json", "JSON", 0, 0, 0, 0, -1, 0, 0, 0, -1
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.md", "Markdown", 0, 0, 0, -39, 0, 0, 0, -7, -46
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\details.md", "Markdown", 0, 0, 0, -71, 0, 0, 0, -6, -77
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md", "Markdown", 0, 0, 0, -52, 0, 0, 0, -6, -58
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff.md", "Markdown", 0, 0, 0, -31, 0, 0, 0, -7, -38
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.json", "JSON", 0, 0, 0, 0, -1, 0, 0, 0, -1
"c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.md", "Markdown", 0, 0, 0, -44, 0, 0, 0, -7, -51
"c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main.py", "Python", 0, 0, -14, 0, 0, 0, -2, -10, -26
"c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main_debug.py", "Python", 0, 0, -12, 0, 0, 0, -2, -10, -24
"c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main.py", "Python", 0, 0, -16, 0, 0, 0, -2, -10, -28
"c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main_debug.py", "Python", 0, 0, -13, 0, 0, 0, -2, -10, -25
"c:\Users\alex1\git\projektarbeit\doc\Diagrams\classdiagramm.uxf", "umlet", 0, 0, 0, 0, 0, -142, 0, -15, -157
"c:\Users\alex1\git\projektarbeit\doc\Diagrams\statesAutopilot.uxf", "umlet", 0, 0, 0, 0, 0, -389, 0, -2, -391
"c:\Users\alex1\git\projektarbeit\include\config.h", "C++", 0, -5, 0, 0, 0, 0, -15, -2, -22
"c:\Users\alex1\git\projektarbeit\include\moveControl.h", "C++", 0, -54, 0, 0, 0, 0, -102, -23, -179
"c:\Users\alex1\git\projektarbeit\include\moveControlConfig.h", "C++", 0, -23, 0, 0, 0, 0, -18, -4, -45
"c:\Users\alex1\git\projektarbeit\include\network.h", "C++", 0, -25, 0, 0, 0, 0, -56, -14, -95
"c:\Users\alex1\git\projektarbeit\include\networkConfig.h", "C++", 0, -97, 0, 0, 0, 0, -37, -17, -151
"c:\Users\alex1\git\projektarbeit\lib\Battery\battery.cpp", "C++", 0, -45, 0, 0, 0, 0, -11, -10, -66
"c:\Users\alex1\git\projektarbeit\lib\Battery\battery.h", "C++", 0, -33, 0, 0, 0, 0, -52, -13, -98
"c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.cpp", "C++", 0, 0, 0, 0, 0, 0, 0, -1, -1
"c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.h", "C++", 0, 0, 0, 0, 0, 0, 0, -1, -1
"c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.cpp", "C++", 0, -81, 0, 0, 0, 0, -12, -17, -110
"c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.h", "C++", 0, -41, 0, 0, 0, 0, -120, -18, -179
"c:\Users\alex1\git\projektarbeit\lib\Menu\menu.cpp", "C++", 0, -106, 0, 0, 0, 0, -11, -19, -136
"c:\Users\alex1\git\projektarbeit\lib\Menu\menu.h", "C++", 0, -26, 0, 0, 0, 0, -18, -12, -56
"c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.cpp", "C++", 0, -36, 0, 0, 0, 0, -10, -9, -55
"c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.h", "C++", 0, -21, 0, 0, 0, 0, -53, -15, -89
"c:\Users\alex1\git\projektarbeit\lib\Menu\menuControl.h", "C++", 0, -22, 0, 0, 0, 0, -44, -10, -76
"c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.cpp", "C++", 0, -170, 0, 0, 0, 0, -14, -41, -225
"c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.h", "C++", 0, -46, 0, 0, 0, 0, -34, -20, -100
"c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.cpp", "C++", 0, -144, 0, 0, 0, 0, -24, -35, -203
"c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.h", "C++", 0, -47, 0, 0, 0, 0, -102, -22, -171
"c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.cpp", "C++", 0, -178, 0, 0, 0, 0, -28, -40, -246
"c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.h", "C++", 0, -53, 0, 0, 0, 0, -119, -29, -201
"c:\Users\alex1\git\projektarbeit\lib\Navigation\route.cpp", "C++", 0, -28, 0, 0, 0, 0, -10, -8, -46
"c:\Users\alex1\git\projektarbeit\lib\Navigation\route.h", "C++", 0, -34, 0, 0, 0, 0, -74, -20, -128
"c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.cpp", "C++", 0, -186, 0, 0, 0, 0, -22, -42, -250
"c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.h", "C++", 0, -50, 0, 0, 0, 0, 0, -16, -66
"c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.cpp", "C++", 0, -81, 0, 0, 0, 0, -12, -21, -114
"c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.h", "C++", 0, -35, 0, 0, 0, 0, -68, -22, -125
"c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.cpp", "C++", 0, -28, 0, 0, 0, 0, -10, -9, -47
"c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.h", "C++", 0, -19, 0, 0, 0, 0, -40, -13, -72
"c:\Users\alex1\git\projektarbeit\platformio.ini", "Ini", -19, 0, 0, 0, 0, 0, -9, -3, -31
"c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.cpp", "C++", 0, -36, 0, 0, 0, 0, -11, -13, -60
"c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.h", "C++", 0, -24, 0, 0, 0, 0, -32, -12, -68
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.cpp", "C++", 0, -48, 0, 0, 0, 0, -10, -12, -70
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.h", "C++", 0, -22, 0, 0, 0, 0, -31, -12, -65
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.cpp", "C++", 0, -159, 0, 0, 0, 0, -10, -23, -192
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.h", "C++", 0, -28, 0, 0, 0, 0, -47, -18, -93
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.cpp", "C++", 0, -65, 0, 0, 0, 0, -10, -19, -94
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.h", "C++", 0, -23, 0, 0, 0, 0, -43, -16, -82
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp", "C++", 0, -69, 0, 0, 0, 0, -11, -14, -94
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h", "C++", 0, -16, 0, 0, 0, 0, -31, -10, -57
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp", "C++", 0, -25, 0, 0, 0, 0, -10, -6, -41
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h", "C++", 0, -14, 0, 0, 0, 0, -31, -8, -53
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp", "C++", 0, -12, 0, 0, 0, 0, -10, -3, -25
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h", "C++", 0, -9, 0, 0, 0, 0, -27, -6, -42
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp", "C++", 0, -115, 0, 0, 0, 0, -23, -29, -167
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.h", "C++", 0, -37, 0, 0, 0, 0, -10, -11, -58
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.cpp", "C++", 0, -13, 0, 0, 0, 0, -10, -5, -28
"c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.h", "C++", 0, -20, 0, 0, 0, 0, -22, -8, -50
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.cpp", "C++", 0, -73, 0, 0, 0, 0, -11, -20, -104
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.h", "C++", 0, -34, 0, 0, 0, 0, -82, -19, -135
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilotConfig.h", "C++", 0, -9, 0, 0, 0, 0, -36, -10, -55
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.cpp", "C++", 0, -29, 0, 0, 0, 0, -10, -7, -46
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.h", "C++", 0, -21, 0, 0, 0, 0, -51, -13, -85
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.cpp", "C++", 0, -1, 0, 0, 0, 0, -10, -3, -14
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.h", "C++", 0, -6, 0, 0, 0, 0, -10, -5, -21
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.cpp", "C++", 0, -25, 0, 0, 0, 0, -10, -7, -42
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.h", "C++", 0, -22, 0, 0, 0, 0, -49, -12, -83
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.cpp", "C++", 0, 0, 0, 0, 0, 0, 0, -1, -1
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.h", "C++", 0, 0, 0, 0, 0, 0, 0, -1, -1
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.cpp", "C++", 0, -99, 0, 0, 0, 0, -14, -28, -141
"c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.h", "C++", 0, -26, 0, 0, 0, 0, -10, -14, -50
"c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.cpp", "C++", 0, -63, 0, 0, 0, 0, -13, -21, -97
"c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.h", "C++", 0, -41, 0, 0, 0, 0, -69, -17, -127
"c:\Users\alex1\git\projektarbeit\src\driveModi\driveModi.h", "C++", 0, -10, 0, 0, 0, 0, -22, -6, -38
"c:\Users\alex1\git\projektarbeit\src\main.cpp", "C++", 0, -227, 0, 0, 0, 0, -38, -43, -308
"c:\Users\alex1\git\projektarbeit\src\moveControl.cpp", "C++", 0, -133, 0, 0, 0, 0, -35, -34, -202
"c:\Users\alex1\git\projektarbeit\src\network.cpp", "C++", 0, -86, 0, 0, 0, 0, -16, -17, -119
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\details.md", "Markdown", 0, 0, 0, 60, 0, 0, 0, 6, 66
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md", "Markdown", 0, 0, 0, 9, 0, 0, 0, 6, 15
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff.md", "Markdown", 0, 0, 0, 12, 0, 0, 0, 7, 19
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.json", "JSON", 0, 0, 0, 0, 1, 0, 0, 0, 1
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.md", "Markdown", 0, 0, 0, 39, 0, 0, 0, 7, 46
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\details.md", "Markdown", 0, 0, 0, 71, 0, 0, 0, 6, 77
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md", "Markdown", 0, 0, 0, 52, 0, 0, 0, 6, 58
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff.md", "Markdown", 0, 0, 0, 31, 0, 0, 0, 7, 38
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.json", "JSON", 0, 0, 0, 0, 1, 0, 0, 0, 1
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.md", "Markdown", 0, 0, 0, 44, 0, 0, 0, 7, 51
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\details.md", "Markdown", 0, 0, 0, 93, 0, 0, 0, 6, 99
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff-details.md", "Markdown", 0, 0, 0, 91, 0, 0, 0, 6, 97
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff.md", "Markdown", 0, 0, 0, 54, 0, 0, 0, 7, 61
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.json", "JSON", 0, 0, 0, 0, 1, 0, 0, 0, 1
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.md", "Markdown", 0, 0, 0, 57, 0, 0, 0, 7, 64
"d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main.py", "Python", 0, 0, 14, 0, 0, 0, 2, 10, 26
"d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main_debug.py", "Python", 0, 0, 12, 0, 0, 0, 2, 10, 24
"d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main.py", "Python", 0, 0, 16, 0, 0, 0, 2, 10, 28
"d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main_debug.py", "Python", 0, 0, 13, 0, 0, 0, 2, 10, 25
"d:\Embedded\Projektarbeit-Rover\include\config.h", "C++", 0, 8, 0, 0, 0, 0, 26, 5, 39
"d:\Embedded\Projektarbeit-Rover\include\moveControl.h", "C++", 0, 58, 0, 0, 0, 0, 130, 28, 216
"d:\Embedded\Projektarbeit-Rover\include\moveControlConfig.h", "C++", 0, 21, 0, 0, 0, 0, 18, 4, 43
"d:\Embedded\Projektarbeit-Rover\include\network.h", "C++", 0, 33, 0, 0, 0, 0, 56, 16, 105
"d:\Embedded\Projektarbeit-Rover\include\networkConfig.h", "C++", 0, 98, 0, 0, 0, 0, 37, 17, 152
"d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.cpp", "C++", 0, 107, 0, 0, 0, 0, 13, 22, 142
"d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.h", "C++", 0, 55, 0, 0, 0, 0, 65, 16, 136
"d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.cpp", "C++", 0, 56, 0, 0, 0, 0, 10, 15, 81
"d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.h", "C++", 0, 25, 0, 0, 0, 0, 10, 16, 51
"d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPadInput.h", "C++", 0, 50, 0, 0, 0, 0, 10, 15, 75
"d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.cpp", "C++", 0, 45, 0, 0, 0, 0, 0, 12, 57
"d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.h", "C++", 0, 21, 0, 0, 0, 0, 0, 10, 31
"d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.cpp", "C++", 0, 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.h", "C++", 0, 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.cpp", "C++", 0, 45, 0, 0, 0, 0, 10, 12, 67
"d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.h", "C++", 0, 25, 0, 0, 0, 0, 41, 15, 81
"d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.cpp", "C++", 0, 81, 0, 0, 0, 0, 12, 17, 110
"d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.h", "C++", 0, 41, 0, 0, 0, 0, 120, 18, 179
"d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.cpp", "C++", 0, 142, 0, 0, 0, 0, 24, 35, 201
"d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.h", "C++", 0, 48, 0, 0, 0, 0, 102, 22, 172
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.cpp", "C++", 0, 192, 0, 0, 0, 0, 29, 47, 268
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.h", "C++", 0, 68, 0, 0, 0, 0, 141, 36, 245
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.cpp", "C++", 0, 125, 0, 0, 0, 0, 22, 34, 181
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.h", "C++", 0, 71, 0, 0, 0, 0, 135, 35, 241
"d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.cpp", "C++", 0, 198, 0, 0, 0, 0, 23, 46, 267
"d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.h", "C++", 0, 51, 0, 0, 0, 0, 63, 18, 132
"d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.cpp", "C++", 0, 109, 0, 0, 0, 0, 18, 32, 159
"d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.h", "C++", 0, 51, 0, 0, 0, 0, 100, 28, 179
"d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.cpp", "C++", 0, 28, 0, 0, 0, 0, 10, 9, 47
"d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.h", "C++", 0, 19, 0, 0, 0, 0, 45, 13, 77
"d:\Embedded\Projektarbeit-Rover\platformio.ini", "Ini", 26, 0, 0, 0, 0, 0, 9, 5, 40
"d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.cpp", "C++", 0, 36, 0, 0, 0, 0, 11, 13, 60
"d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.h", "C++", 0, 24, 0, 0, 0, 0, 48, 14, 86
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.cpp", "C++", 0, 130, 0, 0, 0, 0, 11, 19, 160
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.h", "C++", 0, 17, 0, 0, 0, 0, 19, 8, 44
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.cpp", "C++", 0, 9, 0, 0, 0, 0, 10, 4, 23
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.h", "C++", 0, 13, 0, 0, 0, 0, 19, 8, 40
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.cpp", "C++", 0, 197, 0, 0, 0, 0, 13, 55, 265
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.h", "C++", 0, 52, 0, 0, 0, 0, 83, 22, 157
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.cpp", "C++", 0, 54, 0, 0, 0, 0, 12, 11, 77
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.h", "C++", 0, 15, 0, 0, 0, 0, 27, 9, 51
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformatio.cpp", "C++", 0, 34, 0, 0, 0, 0, 15, 11, 60
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformation.h", "C++", 0, 14, 0, 0, 0, 0, 21, 8, 43
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp", "C++", 0, 122, 0, 0, 0, 0, 10, 24, 156
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h", "C++", 0, 14, 0, 0, 0, 0, 31, 9, 54
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp", "C++", 0, 47, 0, 0, 0, 0, 10, 13, 70
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h", "C++", 0, 13, 0, 0, 0, 0, 31, 8, 52
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp", "C++", 0, 58, 0, 0, 0, 0, 10, 16, 84
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h", "C++", 0, 14, 0, 0, 0, 0, 27, 8, 49
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp", "C++", 0, 183, 0, 0, 0, 0, 20, 40, 243
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.h", "C++", 0, 48, 0, 0, 0, 0, 36, 16, 100
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.cpp", "C++", 0, 54, 0, 0, 0, 0, 10, 16, 80
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.h", "C++", 0, 20, 0, 0, 0, 0, 34, 11, 65
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.cpp", "C++", 0, 16, 0, 0, 0, 0, 10, 5, 31
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.h", "C++", 0, 15, 0, 0, 0, 0, 25, 8, 48
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.cpp", "C++", 0, 99, 0, 0, 0, 0, 11, 25, 135
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.h", "C++", 0, 46, 0, 0, 0, 0, 68, 18, 132
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilotConfig.h", "C++", 0, 9, 0, 0, 0, 0, 36, 10, 55
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.cpp", "C++", 0, 63, 0, 0, 0, 0, 10, 14, 87
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.h", "C++", 0, 34, 0, 0, 0, 0, 62, 17, 113
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.cpp", "C++", 0, 1, 0, 0, 0, 0, 10, 3, 14
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.h", "C++", 0, 6, 0, 0, 0, 0, 10, 5, 21
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.cpp", "C++", 0, 26, 0, 0, 0, 0, 15, 8, 49
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.h", "C++", 0, 30, 0, 0, 0, 0, 49, 12, 91
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.cpp", "C++", 0, 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.h", "C++", 0, 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.cpp", "C++", 0, 115, 0, 0, 0, 0, 14, 27, 156
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.h", "C++", 0, 50, 0, 0, 0, 0, 79, 24, 153
"d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.cpp", "C++", 0, 64, 0, 0, 0, 0, 14, 21, 99
"d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.h", "C++", 0, 43, 0, 0, 0, 0, 69, 17, 129
"d:\Embedded\Projektarbeit-Rover\src\driveModi\driveModi.h", "C++", 0, 9, 0, 0, 0, 0, 22, 5, 36
"d:\Embedded\Projektarbeit-Rover\src\main.cpp", "C++", 0, 234, 0, 0, 0, 0, 22, 47, 303
"d:\Embedded\Projektarbeit-Rover\src\moveControl.cpp", "C++", 0, 162, 0, 0, 0, 0, 27, 39, 228
"d:\Embedded\Projektarbeit-Rover\src\network.cpp", "C++", 0, 113, 0, 0, 0, 0, 17, 26, 156
"Total", "-", 7, 820, 0, 295, 1, -531, 367, 256, 1215
1 filename language Ini C++ Python Markdown JSON umlet comment blank total
2 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\details.md Markdown 0 0 0 -60 0 0 0 -6 -66
3 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md Markdown 0 0 0 -9 0 0 0 -6 -15
4 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff.md Markdown 0 0 0 -12 0 0 0 -7 -19
5 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.json JSON 0 0 0 0 -1 0 0 0 -1
6 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.md Markdown 0 0 0 -39 0 0 0 -7 -46
7 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\details.md Markdown 0 0 0 -71 0 0 0 -6 -77
8 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md Markdown 0 0 0 -52 0 0 0 -6 -58
9 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff.md Markdown 0 0 0 -31 0 0 0 -7 -38
10 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.json JSON 0 0 0 0 -1 0 0 0 -1
11 c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.md Markdown 0 0 0 -44 0 0 0 -7 -51
12 c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main.py Python 0 0 -14 0 0 0 -2 -10 -26
13 c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main_debug.py Python 0 0 -12 0 0 0 -2 -10 -24
14 c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main.py Python 0 0 -16 0 0 0 -2 -10 -28
15 c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main_debug.py Python 0 0 -13 0 0 0 -2 -10 -25
16 c:\Users\alex1\git\projektarbeit\doc\Diagrams\classdiagramm.uxf umlet 0 0 0 0 0 -142 0 -15 -157
17 c:\Users\alex1\git\projektarbeit\doc\Diagrams\statesAutopilot.uxf umlet 0 0 0 0 0 -389 0 -2 -391
18 c:\Users\alex1\git\projektarbeit\include\config.h C++ 0 -5 0 0 0 0 -15 -2 -22
19 c:\Users\alex1\git\projektarbeit\include\moveControl.h C++ 0 -54 0 0 0 0 -102 -23 -179
20 c:\Users\alex1\git\projektarbeit\include\moveControlConfig.h C++ 0 -23 0 0 0 0 -18 -4 -45
21 c:\Users\alex1\git\projektarbeit\include\network.h C++ 0 -25 0 0 0 0 -56 -14 -95
22 c:\Users\alex1\git\projektarbeit\include\networkConfig.h C++ 0 -97 0 0 0 0 -37 -17 -151
23 c:\Users\alex1\git\projektarbeit\lib\Battery\battery.cpp C++ 0 -45 0 0 0 0 -11 -10 -66
24 c:\Users\alex1\git\projektarbeit\lib\Battery\battery.h C++ 0 -33 0 0 0 0 -52 -13 -98
25 c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.cpp C++ 0 0 0 0 0 0 0 -1 -1
26 c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.h C++ 0 0 0 0 0 0 0 -1 -1
27 c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.cpp C++ 0 -81 0 0 0 0 -12 -17 -110
28 c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.h C++ 0 -41 0 0 0 0 -120 -18 -179
29 c:\Users\alex1\git\projektarbeit\lib\Menu\menu.cpp C++ 0 -106 0 0 0 0 -11 -19 -136
30 c:\Users\alex1\git\projektarbeit\lib\Menu\menu.h C++ 0 -26 0 0 0 0 -18 -12 -56
31 c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.cpp C++ 0 -36 0 0 0 0 -10 -9 -55
32 c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.h C++ 0 -21 0 0 0 0 -53 -15 -89
33 c:\Users\alex1\git\projektarbeit\lib\Menu\menuControl.h C++ 0 -22 0 0 0 0 -44 -10 -76
34 c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.cpp C++ 0 -170 0 0 0 0 -14 -41 -225
35 c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.h C++ 0 -46 0 0 0 0 -34 -20 -100
36 c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.cpp C++ 0 -144 0 0 0 0 -24 -35 -203
37 c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.h C++ 0 -47 0 0 0 0 -102 -22 -171
38 c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.cpp C++ 0 -178 0 0 0 0 -28 -40 -246
39 c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.h C++ 0 -53 0 0 0 0 -119 -29 -201
40 c:\Users\alex1\git\projektarbeit\lib\Navigation\route.cpp C++ 0 -28 0 0 0 0 -10 -8 -46
41 c:\Users\alex1\git\projektarbeit\lib\Navigation\route.h C++ 0 -34 0 0 0 0 -74 -20 -128
42 c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.cpp C++ 0 -186 0 0 0 0 -22 -42 -250
43 c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.h C++ 0 -50 0 0 0 0 0 -16 -66
44 c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.cpp C++ 0 -81 0 0 0 0 -12 -21 -114
45 c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.h C++ 0 -35 0 0 0 0 -68 -22 -125
46 c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.cpp C++ 0 -28 0 0 0 0 -10 -9 -47
47 c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.h C++ 0 -19 0 0 0 0 -40 -13 -72
48 c:\Users\alex1\git\projektarbeit\platformio.ini Ini -19 0 0 0 0 0 -9 -3 -31
49 c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.cpp C++ 0 -36 0 0 0 0 -11 -13 -60
50 c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.h C++ 0 -24 0 0 0 0 -32 -12 -68
51 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.cpp C++ 0 -48 0 0 0 0 -10 -12 -70
52 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.h C++ 0 -22 0 0 0 0 -31 -12 -65
53 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.cpp C++ 0 -159 0 0 0 0 -10 -23 -192
54 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.h C++ 0 -28 0 0 0 0 -47 -18 -93
55 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.cpp C++ 0 -65 0 0 0 0 -10 -19 -94
56 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.h C++ 0 -23 0 0 0 0 -43 -16 -82
57 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp C++ 0 -69 0 0 0 0 -11 -14 -94
58 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h C++ 0 -16 0 0 0 0 -31 -10 -57
59 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp C++ 0 -25 0 0 0 0 -10 -6 -41
60 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h C++ 0 -14 0 0 0 0 -31 -8 -53
61 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp C++ 0 -12 0 0 0 0 -10 -3 -25
62 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h C++ 0 -9 0 0 0 0 -27 -6 -42
63 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp C++ 0 -115 0 0 0 0 -23 -29 -167
64 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.h C++ 0 -37 0 0 0 0 -10 -11 -58
65 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.cpp C++ 0 -13 0 0 0 0 -10 -5 -28
66 c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.h C++ 0 -20 0 0 0 0 -22 -8 -50
67 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.cpp C++ 0 -73 0 0 0 0 -11 -20 -104
68 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.h C++ 0 -34 0 0 0 0 -82 -19 -135
69 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilotConfig.h C++ 0 -9 0 0 0 0 -36 -10 -55
70 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.cpp C++ 0 -29 0 0 0 0 -10 -7 -46
71 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.h C++ 0 -21 0 0 0 0 -51 -13 -85
72 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.cpp C++ 0 -1 0 0 0 0 -10 -3 -14
73 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.h C++ 0 -6 0 0 0 0 -10 -5 -21
74 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.cpp C++ 0 -25 0 0 0 0 -10 -7 -42
75 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.h C++ 0 -22 0 0 0 0 -49 -12 -83
76 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.cpp C++ 0 0 0 0 0 0 0 -1 -1
77 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.h C++ 0 0 0 0 0 0 0 -1 -1
78 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.cpp C++ 0 -99 0 0 0 0 -14 -28 -141
79 c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.h C++ 0 -26 0 0 0 0 -10 -14 -50
80 c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.cpp C++ 0 -63 0 0 0 0 -13 -21 -97
81 c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.h C++ 0 -41 0 0 0 0 -69 -17 -127
82 c:\Users\alex1\git\projektarbeit\src\driveModi\driveModi.h C++ 0 -10 0 0 0 0 -22 -6 -38
83 c:\Users\alex1\git\projektarbeit\src\main.cpp C++ 0 -227 0 0 0 0 -38 -43 -308
84 c:\Users\alex1\git\projektarbeit\src\moveControl.cpp C++ 0 -133 0 0 0 0 -35 -34 -202
85 c:\Users\alex1\git\projektarbeit\src\network.cpp C++ 0 -86 0 0 0 0 -16 -17 -119
86 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\details.md Markdown 0 0 0 60 0 0 0 6 66
87 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md Markdown 0 0 0 9 0 0 0 6 15
88 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff.md Markdown 0 0 0 12 0 0 0 7 19
89 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.json JSON 0 0 0 0 1 0 0 0 1
90 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.md Markdown 0 0 0 39 0 0 0 7 46
91 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\details.md Markdown 0 0 0 71 0 0 0 6 77
92 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md Markdown 0 0 0 52 0 0 0 6 58
93 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff.md Markdown 0 0 0 31 0 0 0 7 38
94 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.json JSON 0 0 0 0 1 0 0 0 1
95 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.md Markdown 0 0 0 44 0 0 0 7 51
96 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\details.md Markdown 0 0 0 93 0 0 0 6 99
97 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff-details.md Markdown 0 0 0 91 0 0 0 6 97
98 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff.md Markdown 0 0 0 54 0 0 0 7 61
99 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.json JSON 0 0 0 0 1 0 0 0 1
100 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.md Markdown 0 0 0 57 0 0 0 7 64
101 d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main.py Python 0 0 14 0 0 0 2 10 26
102 d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main_debug.py Python 0 0 12 0 0 0 2 10 24
103 d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main.py Python 0 0 16 0 0 0 2 10 28
104 d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main_debug.py Python 0 0 13 0 0 0 2 10 25
105 d:\Embedded\Projektarbeit-Rover\include\config.h C++ 0 8 0 0 0 0 26 5 39
106 d:\Embedded\Projektarbeit-Rover\include\moveControl.h C++ 0 58 0 0 0 0 130 28 216
107 d:\Embedded\Projektarbeit-Rover\include\moveControlConfig.h C++ 0 21 0 0 0 0 18 4 43
108 d:\Embedded\Projektarbeit-Rover\include\network.h C++ 0 33 0 0 0 0 56 16 105
109 d:\Embedded\Projektarbeit-Rover\include\networkConfig.h C++ 0 98 0 0 0 0 37 17 152
110 d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.cpp C++ 0 107 0 0 0 0 13 22 142
111 d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.h C++ 0 55 0 0 0 0 65 16 136
112 d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.cpp C++ 0 56 0 0 0 0 10 15 81
113 d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.h C++ 0 25 0 0 0 0 10 16 51
114 d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPadInput.h C++ 0 50 0 0 0 0 10 15 75
115 d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.cpp C++ 0 45 0 0 0 0 0 12 57
116 d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.h C++ 0 21 0 0 0 0 0 10 31
117 d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.cpp C++ 0 0 0 0 0 0 0 1 1
118 d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.h C++ 0 0 0 0 0 0 0 1 1
119 d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.cpp C++ 0 45 0 0 0 0 10 12 67
120 d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.h C++ 0 25 0 0 0 0 41 15 81
121 d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.cpp C++ 0 81 0 0 0 0 12 17 110
122 d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.h C++ 0 41 0 0 0 0 120 18 179
123 d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.cpp C++ 0 142 0 0 0 0 24 35 201
124 d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.h C++ 0 48 0 0 0 0 102 22 172
125 d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.cpp C++ 0 192 0 0 0 0 29 47 268
126 d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.h C++ 0 68 0 0 0 0 141 36 245
127 d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.cpp C++ 0 125 0 0 0 0 22 34 181
128 d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.h C++ 0 71 0 0 0 0 135 35 241
129 d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.cpp C++ 0 198 0 0 0 0 23 46 267
130 d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.h C++ 0 51 0 0 0 0 63 18 132
131 d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.cpp C++ 0 109 0 0 0 0 18 32 159
132 d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.h C++ 0 51 0 0 0 0 100 28 179
133 d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.cpp C++ 0 28 0 0 0 0 10 9 47
134 d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.h C++ 0 19 0 0 0 0 45 13 77
135 d:\Embedded\Projektarbeit-Rover\platformio.ini Ini 26 0 0 0 0 0 9 5 40
136 d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.cpp C++ 0 36 0 0 0 0 11 13 60
137 d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.h C++ 0 24 0 0 0 0 48 14 86
138 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.cpp C++ 0 130 0 0 0 0 11 19 160
139 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.h C++ 0 17 0 0 0 0 19 8 44
140 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.cpp C++ 0 9 0 0 0 0 10 4 23
141 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.h C++ 0 13 0 0 0 0 19 8 40
142 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.cpp C++ 0 197 0 0 0 0 13 55 265
143 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.h C++ 0 52 0 0 0 0 83 22 157
144 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.cpp C++ 0 54 0 0 0 0 12 11 77
145 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.h C++ 0 15 0 0 0 0 27 9 51
146 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformatio.cpp C++ 0 34 0 0 0 0 15 11 60
147 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformation.h C++ 0 14 0 0 0 0 21 8 43
148 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp C++ 0 122 0 0 0 0 10 24 156
149 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h C++ 0 14 0 0 0 0 31 9 54
150 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp C++ 0 47 0 0 0 0 10 13 70
151 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h C++ 0 13 0 0 0 0 31 8 52
152 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp C++ 0 58 0 0 0 0 10 16 84
153 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h C++ 0 14 0 0 0 0 27 8 49
154 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp C++ 0 183 0 0 0 0 20 40 243
155 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.h C++ 0 48 0 0 0 0 36 16 100
156 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.cpp C++ 0 54 0 0 0 0 10 16 80
157 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.h C++ 0 20 0 0 0 0 34 11 65
158 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.cpp C++ 0 16 0 0 0 0 10 5 31
159 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.h C++ 0 15 0 0 0 0 25 8 48
160 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.cpp C++ 0 99 0 0 0 0 11 25 135
161 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.h C++ 0 46 0 0 0 0 68 18 132
162 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilotConfig.h C++ 0 9 0 0 0 0 36 10 55
163 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.cpp C++ 0 63 0 0 0 0 10 14 87
164 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.h C++ 0 34 0 0 0 0 62 17 113
165 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.cpp C++ 0 1 0 0 0 0 10 3 14
166 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.h C++ 0 6 0 0 0 0 10 5 21
167 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.cpp C++ 0 26 0 0 0 0 15 8 49
168 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.h C++ 0 30 0 0 0 0 49 12 91
169 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.cpp C++ 0 0 0 0 0 0 0 1 1
170 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.h C++ 0 0 0 0 0 0 0 1 1
171 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.cpp C++ 0 115 0 0 0 0 14 27 156
172 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.h C++ 0 50 0 0 0 0 79 24 153
173 d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.cpp C++ 0 64 0 0 0 0 14 21 99
174 d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.h C++ 0 43 0 0 0 0 69 17 129
175 d:\Embedded\Projektarbeit-Rover\src\driveModi\driveModi.h C++ 0 9 0 0 0 0 22 5 36
176 d:\Embedded\Projektarbeit-Rover\src\main.cpp C++ 0 234 0 0 0 0 22 47 303
177 d:\Embedded\Projektarbeit-Rover\src\moveControl.cpp C++ 0 162 0 0 0 0 27 39 228
178 d:\Embedded\Projektarbeit-Rover\src\network.cpp C++ 0 113 0 0 0 0 17 26 156
179 Total - 7 820 0 295 1 -531 367 256 1215
+117
View File
@@ -0,0 +1,117 @@
# Diff Summary
Date : 2023-05-11 22:19:18
Directory d:\\Embedded\\Projektarbeit-Rover
Total : 177 files, 592 codes, 367 comments, 256 blanks, all 1215 lines
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| C++ | 140 | 820 | 367 | 245 | 1,432 |
| Markdown | 20 | 295 | 0 | 26 | 321 |
| Ini | 2 | 7 | 0 | 2 | 9 |
| JSON | 5 | 1 | 0 | 0 | 1 |
| Python | 8 | 0 | 0 | 0 | 0 |
| umlet | 2 | -531 | 0 | -17 | -548 |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| . | 93 | 4,871 | 2,365 | 1,394 | 8,630 |
| . (Files) | 1 | 26 | 9 | 5 | 40 |
| .VSCodeCounter | 15 | 616 | 0 | 78 | 694 |
| .VSCodeCounter\\2022-01-19_11-26-30 | 5 | 121 | 0 | 26 | 147 |
| .VSCodeCounter\\2022-02-01_10-50-06 | 5 | 199 | 0 | 26 | 225 |
| .VSCodeCounter\\2022-12-09_11-39-58 | 5 | 296 | 0 | 26 | 322 |
| c:\\ | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\\Users | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\\Users\\alex1 | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\\Users\\alex1\\git | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\\Users\\alex1\\git\\projektarbeit | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\\Users\\alex1\\git\\projektarbeit (Files) | 1 | -19 | -9 | -3 | -31 |
| c:\\Users\\alex1\\git\\projektarbeit\\.VSCodeCounter | 10 | -320 | 0 | -52 | -372 |
| c:\\Users\\alex1\\git\\projektarbeit\\.VSCodeCounter\\2022-01-19_11-26-30 | 5 | -121 | 0 | -26 | -147 |
| c:\\Users\\alex1\\git\\projektarbeit\\.VSCodeCounter\\2022-02-01_10-50-06 | 5 | -199 | 0 | -26 | -225 |
| c:\\Users\\alex1\\git\\projektarbeit\\debugMqtt | 4 | -55 | -8 | -40 | -103 |
| c:\\Users\\alex1\\git\\projektarbeit\\debugMqtt\\hw1 | 2 | -26 | -4 | -20 | -50 |
| c:\\Users\\alex1\\git\\projektarbeit\\debugMqtt\\rhede | 2 | -29 | -4 | -20 | -53 |
| c:\\Users\\alex1\\git\\projektarbeit\\doc | 2 | -531 | 0 | -17 | -548 |
| c:\\Users\\alex1\\git\\projektarbeit\\doc\\Diagrams | 2 | -531 | 0 | -17 | -548 |
| c:\\Users\\alex1\\git\\projektarbeit\\include | 5 | -204 | -228 | -60 | -492 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib | 25 | -1,510 | -888 | -463 | -2,861 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\Battery | 2 | -78 | -63 | -23 | -164 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\Illumination | 2 | 0 | 0 | -2 | -2 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\MQTT | 2 | -122 | -132 | -35 | -289 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\Menu | 7 | -427 | -184 | -126 | -737 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\MotorControl | 2 | -191 | -126 | -57 | -374 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\Navigation | 4 | -293 | -231 | -97 | -621 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\NtripClient | 2 | -236 | -22 | -58 | -316 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\Speedometer | 2 | -116 | -80 | -43 | -239 |
| c:\\Users\\alex1\\git\\projektarbeit\\lib\\Times | 2 | -47 | -50 | -22 | -119 |
| c:\\Users\\alex1\\git\\projektarbeit\\src | 37 | -1,640 | -865 | -503 | -3,008 |
| c:\\Users\\alex1\\git\\projektarbeit\\src (Files) | 3 | -446 | -89 | -94 | -629 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\OutputBuf | 2 | -60 | -43 | -25 | -128 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus | 16 | -675 | -336 | -200 | -1,211 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\Akku | 2 | -70 | -41 | -24 | -135 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\GPS | 2 | -187 | -57 | -41 | -285 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\PID | 2 | -88 | -53 | -35 | -176 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\driveModi | 10 | -330 | -185 | -100 | -615 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\driveModi (Files) | 2 | -33 | -32 | -13 | -78 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\driveModi\\Autopilot | 2 | -85 | -42 | -24 | -151 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\driveModi\\CaptureRoute | 2 | -39 | -41 | -14 | -94 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\driveModi\\ManualDrive | 2 | -21 | -37 | -9 | -67 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\SpecialMenus\\driveModi\\TestMode | 2 | -152 | -33 | -40 | -225 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi | 16 | -459 | -397 | -184 | -1,040 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi (Files) | 3 | -114 | -104 | -44 | -262 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi\\Modi | 13 | -345 | -293 | -140 | -778 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi\\Modi\\Autopilot | 3 | -116 | -129 | -49 | -294 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi\\Modi\\CaptureRoute | 2 | -50 | -61 | -20 | -131 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi\\Modi\\ConsolControl | 2 | -7 | -20 | -8 | -35 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi\\Modi\\ManualControl | 2 | -47 | -59 | -19 | -125 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi\\Modi\\Racing | 2 | 0 | 0 | -2 | -2 |
| c:\\Users\\alex1\\git\\projektarbeit\\src\\driveModi\\Modi\\TestMode | 2 | -125 | -24 | -42 | -191 |
| debugMqtt | 4 | 55 | 8 | 40 | 103 |
| debugMqtt\\hw1 | 2 | 26 | 4 | 20 | 50 |
| debugMqtt\\rhede | 2 | 29 | 4 | 20 | 53 |
| include | 5 | 218 | 267 | 70 | 555 |
| lib | 25 | 1,653 | 1,003 | 525 | 3,181 |
| lib\\Battery | 2 | 162 | 78 | 38 | 278 |
| lib\\ControllPad | 3 | 131 | 30 | 46 | 207 |
| lib\\Counter | 2 | 66 | 0 | 22 | 88 |
| lib\\Illumination | 2 | 0 | 0 | 2 | 2 |
| lib\\LcdWrapper | 2 | 70 | 51 | 27 | 148 |
| lib\\MQTT | 2 | 122 | 132 | 35 | 289 |
| lib\\MotorControl | 2 | 190 | 126 | 57 | 373 |
| lib\\Navigation | 4 | 456 | 327 | 152 | 935 |
| lib\\NtripClient | 2 | 249 | 86 | 64 | 399 |
| lib\\Speedometer | 2 | 160 | 118 | 60 | 338 |
| lib\\Times | 2 | 47 | 55 | 22 | 124 |
| src | 43 | 2,303 | 1,078 | 676 | 4,057 |
| src (Files) | 3 | 509 | 66 | 112 | 687 |
| src\\OutputBuf | 2 | 60 | 59 | 27 | 146 |
| src\\SpecialMenus | 22 | 1,139 | 484 | 329 | 1,952 |
| src\\SpecialMenus\\GPS | 2 | 147 | 30 | 27 | 204 |
| src\\SpecialMenus\\PID | 2 | 22 | 29 | 12 | 63 |
| src\\SpecialMenus\\Route | 4 | 318 | 135 | 97 | 550 |
| src\\SpecialMenus\\Systeminformation | 2 | 48 | 36 | 19 | 103 |
| src\\SpecialMenus\\driveModi | 12 | 604 | 254 | 174 | 1,032 |
| src\\SpecialMenus\\driveModi (Files) | 2 | 31 | 35 | 13 | 79 |
| src\\SpecialMenus\\driveModi\\Autopilot | 2 | 136 | 41 | 33 | 210 |
| src\\SpecialMenus\\driveModi\\CaptureRoute | 2 | 60 | 41 | 21 | 122 |
| src\\SpecialMenus\\driveModi\\ManualDrive | 2 | 72 | 37 | 24 | 133 |
| src\\SpecialMenus\\driveModi\\TestMode | 4 | 305 | 100 | 83 | 488 |
| src\\driveModi | 16 | 595 | 469 | 208 | 1,272 |
| src\\driveModi (Files) | 3 | 116 | 105 | 43 | 264 |
| src\\driveModi\\Modi | 13 | 479 | 364 | 165 | 1,008 |
| src\\driveModi\\Modi\\Autopilot | 3 | 154 | 115 | 53 | 322 |
| src\\driveModi\\Modi\\CaptureRoute | 2 | 97 | 72 | 31 | 200 |
| src\\driveModi\\Modi\\ConsolControl | 2 | 7 | 20 | 8 | 35 |
| src\\driveModi\\Modi\\ManualControl | 2 | 56 | 64 | 20 | 140 |
| src\\driveModi\\Modi\\Racing | 2 | 0 | 0 | 2 | 2 |
| src\\driveModi\\Modi\\TestMode | 2 | 165 | 93 | 51 | 309 |
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
+297
View File
@@ -0,0 +1,297 @@
Date : 2023-05-11 22:19:18
Directory : d:\Embedded\Projektarbeit-Rover
Total : 177 files, 592 codes, 367 comments, 256 blanks, all 1215 lines
Languages
+----------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------+------------+------------+------------+------------+------------+
| C++ | 140 | 820 | 367 | 245 | 1,432 |
| Markdown | 20 | 295 | 0 | 26 | 321 |
| Ini | 2 | 7 | 0 | 2 | 9 |
| JSON | 5 | 1 | 0 | 0 | 1 |
| Python | 8 | 0 | 0 | 0 | 0 |
| umlet | 2 | -531 | 0 | -17 | -548 |
+----------+------------+------------+------------+------------+------------+
Directories
+-----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+-----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| . | 93 | 4,871 | 2,365 | 1,394 | 8,630 |
| . (Files) | 1 | 26 | 9 | 5 | 40 |
| .VSCodeCounter | 15 | 616 | 0 | 78 | 694 |
| .VSCodeCounter\2022-01-19_11-26-30 | 5 | 121 | 0 | 26 | 147 |
| .VSCodeCounter\2022-02-01_10-50-06 | 5 | 199 | 0 | 26 | 225 |
| .VSCodeCounter\2022-12-09_11-39-58 | 5 | 296 | 0 | 26 | 322 |
| c:\ | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\Users | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\Users\alex1 | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\Users\alex1\git | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\Users\alex1\git\projektarbeit | 84 | -4,279 | -1,998 | -1,138 | -7,415 |
| c:\Users\alex1\git\projektarbeit (Files) | 1 | -19 | -9 | -3 | -31 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter | 10 | -320 | 0 | -52 | -372 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30 | 5 | -121 | 0 | -26 | -147 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06 | 5 | -199 | 0 | -26 | -225 |
| c:\Users\alex1\git\projektarbeit\debugMqtt | 4 | -55 | -8 | -40 | -103 |
| c:\Users\alex1\git\projektarbeit\debugMqtt\hw1 | 2 | -26 | -4 | -20 | -50 |
| c:\Users\alex1\git\projektarbeit\debugMqtt\rhede | 2 | -29 | -4 | -20 | -53 |
| c:\Users\alex1\git\projektarbeit\doc | 2 | -531 | 0 | -17 | -548 |
| c:\Users\alex1\git\projektarbeit\doc\Diagrams | 2 | -531 | 0 | -17 | -548 |
| c:\Users\alex1\git\projektarbeit\include | 5 | -204 | -228 | -60 | -492 |
| c:\Users\alex1\git\projektarbeit\lib | 25 | -1,510 | -888 | -463 | -2,861 |
| c:\Users\alex1\git\projektarbeit\lib\Battery | 2 | -78 | -63 | -23 | -164 |
| c:\Users\alex1\git\projektarbeit\lib\Illumination | 2 | 0 | 0 | -2 | -2 |
| c:\Users\alex1\git\projektarbeit\lib\MQTT | 2 | -122 | -132 | -35 | -289 |
| c:\Users\alex1\git\projektarbeit\lib\Menu | 7 | -427 | -184 | -126 | -737 |
| c:\Users\alex1\git\projektarbeit\lib\MotorControl | 2 | -191 | -126 | -57 | -374 |
| c:\Users\alex1\git\projektarbeit\lib\Navigation | 4 | -293 | -231 | -97 | -621 |
| c:\Users\alex1\git\projektarbeit\lib\NtripClient | 2 | -236 | -22 | -58 | -316 |
| c:\Users\alex1\git\projektarbeit\lib\Speedometer | 2 | -116 | -80 | -43 | -239 |
| c:\Users\alex1\git\projektarbeit\lib\Times | 2 | -47 | -50 | -22 | -119 |
| c:\Users\alex1\git\projektarbeit\src | 37 | -1,640 | -865 | -503 | -3,008 |
| c:\Users\alex1\git\projektarbeit\src (Files) | 3 | -446 | -89 | -94 | -629 |
| c:\Users\alex1\git\projektarbeit\src\OutputBuf | 2 | -60 | -43 | -25 | -128 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus | 16 | -675 | -336 | -200 | -1,211 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku | 2 | -70 | -41 | -24 | -135 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS | 2 | -187 | -57 | -41 | -285 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID | 2 | -88 | -53 | -35 | -176 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi | 10 | -330 | -185 | -100 | -615 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi (Files) | 2 | -33 | -32 | -13 | -78 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot | 2 | -85 | -42 | -24 | -151 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute | 2 | -39 | -41 | -14 | -94 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive | 2 | -21 | -37 | -9 | -67 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode | 2 | -152 | -33 | -40 | -225 |
| c:\Users\alex1\git\projektarbeit\src\driveModi | 16 | -459 | -397 | -184 | -1,040 |
| c:\Users\alex1\git\projektarbeit\src\driveModi (Files) | 3 | -114 | -104 | -44 | -262 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi | 13 | -345 | -293 | -140 | -778 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot | 3 | -116 | -129 | -49 | -294 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute | 2 | -50 | -61 | -20 | -131 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl | 2 | -7 | -20 | -8 | -35 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl | 2 | -47 | -59 | -19 | -125 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing | 2 | 0 | 0 | -2 | -2 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode | 2 | -125 | -24 | -42 | -191 |
| debugMqtt | 4 | 55 | 8 | 40 | 103 |
| debugMqtt\hw1 | 2 | 26 | 4 | 20 | 50 |
| debugMqtt\rhede | 2 | 29 | 4 | 20 | 53 |
| include | 5 | 218 | 267 | 70 | 555 |
| lib | 25 | 1,653 | 1,003 | 525 | 3,181 |
| lib\Battery | 2 | 162 | 78 | 38 | 278 |
| lib\ControllPad | 3 | 131 | 30 | 46 | 207 |
| lib\Counter | 2 | 66 | 0 | 22 | 88 |
| lib\Illumination | 2 | 0 | 0 | 2 | 2 |
| lib\LcdWrapper | 2 | 70 | 51 | 27 | 148 |
| lib\MQTT | 2 | 122 | 132 | 35 | 289 |
| lib\MotorControl | 2 | 190 | 126 | 57 | 373 |
| lib\Navigation | 4 | 456 | 327 | 152 | 935 |
| lib\NtripClient | 2 | 249 | 86 | 64 | 399 |
| lib\Speedometer | 2 | 160 | 118 | 60 | 338 |
| lib\Times | 2 | 47 | 55 | 22 | 124 |
| src | 43 | 2,303 | 1,078 | 676 | 4,057 |
| src (Files) | 3 | 509 | 66 | 112 | 687 |
| src\OutputBuf | 2 | 60 | 59 | 27 | 146 |
| src\SpecialMenus | 22 | 1,139 | 484 | 329 | 1,952 |
| src\SpecialMenus\GPS | 2 | 147 | 30 | 27 | 204 |
| src\SpecialMenus\PID | 2 | 22 | 29 | 12 | 63 |
| src\SpecialMenus\Route | 4 | 318 | 135 | 97 | 550 |
| src\SpecialMenus\Systeminformation | 2 | 48 | 36 | 19 | 103 |
| src\SpecialMenus\driveModi | 12 | 604 | 254 | 174 | 1,032 |
| src\SpecialMenus\driveModi (Files) | 2 | 31 | 35 | 13 | 79 |
| src\SpecialMenus\driveModi\Autopilot | 2 | 136 | 41 | 33 | 210 |
| src\SpecialMenus\driveModi\CaptureRoute | 2 | 60 | 41 | 21 | 122 |
| src\SpecialMenus\driveModi\ManualDrive | 2 | 72 | 37 | 24 | 133 |
| src\SpecialMenus\driveModi\TestMode | 4 | 305 | 100 | 83 | 488 |
| src\driveModi | 16 | 595 | 469 | 208 | 1,272 |
| src\driveModi (Files) | 3 | 116 | 105 | 43 | 264 |
| src\driveModi\Modi | 13 | 479 | 364 | 165 | 1,008 |
| src\driveModi\Modi\Autopilot | 3 | 154 | 115 | 53 | 322 |
| src\driveModi\Modi\CaptureRoute | 2 | 97 | 72 | 31 | 200 |
| src\driveModi\Modi\ConsolControl | 2 | 7 | 20 | 8 | 35 |
| src\driveModi\Modi\ManualControl | 2 | 56 | 64 | 20 | 140 |
| src\driveModi\Modi\Racing | 2 | 0 | 0 | 2 | 2 |
| src\driveModi\Modi\TestMode | 2 | 165 | 93 | 51 | 309 |
+-----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
Files
+-----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+-----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\details.md | Markdown | -60 | 0 | -6 | -66 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md | Markdown | -9 | 0 | -6 | -15 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\diff.md | Markdown | -12 | 0 | -7 | -19 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.json | JSON | -1 | 0 | 0 | -1 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-01-19_11-26-30\results.md | Markdown | -39 | 0 | -7 | -46 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\details.md | Markdown | -71 | 0 | -6 | -77 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md | Markdown | -52 | 0 | -6 | -58 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\diff.md | Markdown | -31 | 0 | -7 | -38 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.json | JSON | -1 | 0 | 0 | -1 |
| c:\Users\alex1\git\projektarbeit\.VSCodeCounter\2022-02-01_10-50-06\results.md | Markdown | -44 | 0 | -7 | -51 |
| c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main.py | Python | -14 | -2 | -10 | -26 |
| c:\Users\alex1\git\projektarbeit\debugMqtt\hw1\main_debug.py | Python | -12 | -2 | -10 | -24 |
| c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main.py | Python | -16 | -2 | -10 | -28 |
| c:\Users\alex1\git\projektarbeit\debugMqtt\rhede\main_debug.py | Python | -13 | -2 | -10 | -25 |
| c:\Users\alex1\git\projektarbeit\doc\Diagrams\classdiagramm.uxf | umlet | -142 | 0 | -15 | -157 |
| c:\Users\alex1\git\projektarbeit\doc\Diagrams\statesAutopilot.uxf | umlet | -389 | 0 | -2 | -391 |
| c:\Users\alex1\git\projektarbeit\include\config.h | C++ | -5 | -15 | -2 | -22 |
| c:\Users\alex1\git\projektarbeit\include\moveControl.h | C++ | -54 | -102 | -23 | -179 |
| c:\Users\alex1\git\projektarbeit\include\moveControlConfig.h | C++ | -23 | -18 | -4 | -45 |
| c:\Users\alex1\git\projektarbeit\include\network.h | C++ | -25 | -56 | -14 | -95 |
| c:\Users\alex1\git\projektarbeit\include\networkConfig.h | C++ | -97 | -37 | -17 | -151 |
| c:\Users\alex1\git\projektarbeit\lib\Battery\battery.cpp | C++ | -45 | -11 | -10 | -66 |
| c:\Users\alex1\git\projektarbeit\lib\Battery\battery.h | C++ | -33 | -52 | -13 | -98 |
| c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.cpp | C++ | 0 | 0 | -1 | -1 |
| c:\Users\alex1\git\projektarbeit\lib\Illumination\underfloorLighting.h | C++ | 0 | 0 | -1 | -1 |
| c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.cpp | C++ | -81 | -12 | -17 | -110 |
| c:\Users\alex1\git\projektarbeit\lib\MQTT\debugMqtt.h | C++ | -41 | -120 | -18 | -179 |
| c:\Users\alex1\git\projektarbeit\lib\Menu\menu.cpp | C++ | -106 | -11 | -19 | -136 |
| c:\Users\alex1\git\projektarbeit\lib\Menu\menu.h | C++ | -26 | -18 | -12 | -56 |
| c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.cpp | C++ | -36 | -10 | -9 | -55 |
| c:\Users\alex1\git\projektarbeit\lib\Menu\menuAction.h | C++ | -21 | -53 | -15 | -89 |
| c:\Users\alex1\git\projektarbeit\lib\Menu\menuControl.h | C++ | -22 | -44 | -10 | -76 |
| c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.cpp | C++ | -170 | -14 | -41 | -225 |
| c:\Users\alex1\git\projektarbeit\lib\Menu\menuIntInput.h | C++ | -46 | -34 | -20 | -100 |
| c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.cpp | C++ | -144 | -24 | -35 | -203 |
| c:\Users\alex1\git\projektarbeit\lib\MotorControl\motorControl.h | C++ | -47 | -102 | -22 | -171 |
| c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.cpp | C++ | -178 | -28 | -40 | -246 |
| c:\Users\alex1\git\projektarbeit\lib\Navigation\navigation.h | C++ | -53 | -119 | -29 | -201 |
| c:\Users\alex1\git\projektarbeit\lib\Navigation\route.cpp | C++ | -28 | -10 | -8 | -46 |
| c:\Users\alex1\git\projektarbeit\lib\Navigation\route.h | C++ | -34 | -74 | -20 | -128 |
| c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.cpp | C++ | -186 | -22 | -42 | -250 |
| c:\Users\alex1\git\projektarbeit\lib\NtripClient\ntripClient.h | C++ | -50 | 0 | -16 | -66 |
| c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.cpp | C++ | -81 | -12 | -21 | -114 |
| c:\Users\alex1\git\projektarbeit\lib\Speedometer\speedometer.h | C++ | -35 | -68 | -22 | -125 |
| c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.cpp | C++ | -28 | -10 | -9 | -47 |
| c:\Users\alex1\git\projektarbeit\lib\Times\debugTimes.h | C++ | -19 | -40 | -13 | -72 |
| c:\Users\alex1\git\projektarbeit\platformio.ini | Ini | -19 | -9 | -3 | -31 |
| c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.cpp | C++ | -36 | -11 | -13 | -60 |
| c:\Users\alex1\git\projektarbeit\src\OutputBuf\outputBuf.h | C++ | -24 | -32 | -12 | -68 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.cpp | C++ | -48 | -10 | -12 | -70 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\Akku\menuAkku.h | C++ | -22 | -31 | -12 | -65 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.cpp | C++ | -159 | -10 | -23 | -192 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\GPS\menuGPS.h | C++ | -28 | -47 | -18 | -93 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.cpp | C++ | -65 | -10 | -19 | -94 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\PID\menuPidSettings.h | C++ | -23 | -43 | -16 | -82 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp | C++ | -69 | -11 | -14 | -94 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h | C++ | -16 | -31 | -10 | -57 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp | C++ | -25 | -10 | -6 | -41 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h | C++ | -14 | -31 | -8 | -53 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp | C++ | -12 | -10 | -3 | -25 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h | C++ | -9 | -27 | -6 | -42 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp | C++ | -115 | -23 | -29 | -167 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\TestMode\menuTestMode.h | C++ | -37 | -10 | -11 | -58 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.cpp | C++ | -13 | -10 | -5 | -28 |
| c:\Users\alex1\git\projektarbeit\src\SpecialMenus\driveModi\menuDriveMode.h | C++ | -20 | -22 | -8 | -50 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.cpp | C++ | -73 | -11 | -20 | -104 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilot.h | C++ | -34 | -82 | -19 | -135 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Autopilot\autopilotConfig.h | C++ | -9 | -36 | -10 | -55 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.cpp | C++ | -29 | -10 | -7 | -46 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\CaptureRoute\captureRoute.h | C++ | -21 | -51 | -13 | -85 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.cpp | C++ | -1 | -10 | -3 | -14 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ConsolControl\consolControl.h | C++ | -6 | -10 | -5 | -21 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.cpp | C++ | -25 | -10 | -7 | -42 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\ManualControl\manualControl.h | C++ | -22 | -49 | -12 | -83 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.cpp | C++ | 0 | 0 | -1 | -1 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\Racing\racing.h | C++ | 0 | 0 | -1 | -1 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.cpp | C++ | -99 | -14 | -28 | -141 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\Modi\TestMode\testMode.h | C++ | -26 | -10 | -14 | -50 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.cpp | C++ | -63 | -13 | -21 | -97 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\driveManager.h | C++ | -41 | -69 | -17 | -127 |
| c:\Users\alex1\git\projektarbeit\src\driveModi\driveModi.h | C++ | -10 | -22 | -6 | -38 |
| c:\Users\alex1\git\projektarbeit\src\main.cpp | C++ | -227 | -38 | -43 | -308 |
| c:\Users\alex1\git\projektarbeit\src\moveControl.cpp | C++ | -133 | -35 | -34 | -202 |
| c:\Users\alex1\git\projektarbeit\src\network.cpp | C++ | -86 | -16 | -17 | -119 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\details.md | Markdown | 60 | 0 | 6 | 66 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md | Markdown | 9 | 0 | 6 | 15 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff.md | Markdown | 12 | 0 | 7 | 19 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.json | JSON | 1 | 0 | 0 | 1 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.md | Markdown | 39 | 0 | 7 | 46 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\details.md | Markdown | 71 | 0 | 6 | 77 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md | Markdown | 52 | 0 | 6 | 58 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff.md | Markdown | 31 | 0 | 7 | 38 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.json | JSON | 1 | 0 | 0 | 1 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.md | Markdown | 44 | 0 | 7 | 51 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\details.md | Markdown | 93 | 0 | 6 | 99 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff-details.md | Markdown | 91 | 0 | 6 | 97 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff.md | Markdown | 54 | 0 | 7 | 61 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.json | JSON | 1 | 0 | 0 | 1 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.md | Markdown | 57 | 0 | 7 | 64 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main.py | Python | 14 | 2 | 10 | 26 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main_debug.py | Python | 12 | 2 | 10 | 24 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main.py | Python | 16 | 2 | 10 | 28 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main_debug.py | Python | 13 | 2 | 10 | 25 |
| d:\Embedded\Projektarbeit-Rover\include\config.h | C++ | 8 | 26 | 5 | 39 |
| d:\Embedded\Projektarbeit-Rover\include\moveControl.h | C++ | 58 | 130 | 28 | 216 |
| d:\Embedded\Projektarbeit-Rover\include\moveControlConfig.h | C++ | 21 | 18 | 4 | 43 |
| d:\Embedded\Projektarbeit-Rover\include\network.h | C++ | 33 | 56 | 16 | 105 |
| d:\Embedded\Projektarbeit-Rover\include\networkConfig.h | C++ | 98 | 37 | 17 | 152 |
| d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.cpp | C++ | 107 | 13 | 22 | 142 |
| d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.h | C++ | 55 | 65 | 16 | 136 |
| d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.cpp | C++ | 56 | 10 | 15 | 81 |
| d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.h | C++ | 25 | 10 | 16 | 51 |
| d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPadInput.h | C++ | 50 | 10 | 15 | 75 |
| d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.cpp | C++ | 45 | 0 | 12 | 57 |
| d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.h | C++ | 21 | 0 | 10 | 31 |
| d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.cpp | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.h | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.cpp | C++ | 45 | 10 | 12 | 67 |
| d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.h | C++ | 25 | 41 | 15 | 81 |
| d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.cpp | C++ | 81 | 12 | 17 | 110 |
| d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.h | C++ | 41 | 120 | 18 | 179 |
| d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.cpp | C++ | 142 | 24 | 35 | 201 |
| d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.h | C++ | 48 | 102 | 22 | 172 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.cpp | C++ | 192 | 29 | 47 | 268 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.h | C++ | 68 | 141 | 36 | 245 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.cpp | C++ | 125 | 22 | 34 | 181 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.h | C++ | 71 | 135 | 35 | 241 |
| d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.cpp | C++ | 198 | 23 | 46 | 267 |
| d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.h | C++ | 51 | 63 | 18 | 132 |
| d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.cpp | C++ | 109 | 18 | 32 | 159 |
| d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.h | C++ | 51 | 100 | 28 | 179 |
| d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.cpp | C++ | 28 | 10 | 9 | 47 |
| d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.h | C++ | 19 | 45 | 13 | 77 |
| d:\Embedded\Projektarbeit-Rover\platformio.ini | Ini | 26 | 9 | 5 | 40 |
| d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.cpp | C++ | 36 | 11 | 13 | 60 |
| d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.h | C++ | 24 | 48 | 14 | 86 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.cpp | C++ | 130 | 11 | 19 | 160 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.h | C++ | 17 | 19 | 8 | 44 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.cpp | C++ | 9 | 10 | 4 | 23 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.h | C++ | 13 | 19 | 8 | 40 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.cpp | C++ | 197 | 13 | 55 | 265 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.h | C++ | 52 | 83 | 22 | 157 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.cpp | C++ | 54 | 12 | 11 | 77 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.h | C++ | 15 | 27 | 9 | 51 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformatio.cpp | C++ | 34 | 15 | 11 | 60 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformation.h | C++ | 14 | 21 | 8 | 43 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp | C++ | 122 | 10 | 24 | 156 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h | C++ | 14 | 31 | 9 | 54 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp | C++ | 47 | 10 | 13 | 70 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h | C++ | 13 | 31 | 8 | 52 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp | C++ | 58 | 10 | 16 | 84 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h | C++ | 14 | 27 | 8 | 49 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp | C++ | 183 | 20 | 40 | 243 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.h | C++ | 48 | 36 | 16 | 100 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.cpp | C++ | 54 | 10 | 16 | 80 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.h | C++ | 20 | 34 | 11 | 65 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.cpp | C++ | 16 | 10 | 5 | 31 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.h | C++ | 15 | 25 | 8 | 48 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.cpp | C++ | 99 | 11 | 25 | 135 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.h | C++ | 46 | 68 | 18 | 132 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilotConfig.h | C++ | 9 | 36 | 10 | 55 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.cpp | C++ | 63 | 10 | 14 | 87 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.h | C++ | 34 | 62 | 17 | 113 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.cpp | C++ | 1 | 10 | 3 | 14 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.h | C++ | 6 | 10 | 5 | 21 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.cpp | C++ | 26 | 15 | 8 | 49 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.h | C++ | 30 | 49 | 12 | 91 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.cpp | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.h | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.cpp | C++ | 115 | 14 | 27 | 156 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.h | C++ | 50 | 79 | 24 | 153 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.cpp | C++ | 64 | 14 | 21 | 99 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.h | C++ | 43 | 69 | 17 | 129 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\driveModi.h | C++ | 9 | 22 | 5 | 36 |
| d:\Embedded\Projektarbeit-Rover\src\main.cpp | C++ | 234 | 22 | 47 | 303 |
| d:\Embedded\Projektarbeit-Rover\src\moveControl.cpp | C++ | 162 | 27 | 39 | 228 |
| d:\Embedded\Projektarbeit-Rover\src\network.cpp | C++ | 113 | 17 | 26 | 156 |
| Total | | 592 | 367 | 256 | 1,215 |
+-----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
@@ -0,0 +1,95 @@
"filename", "language", "Ini", "C++", "Python", "Markdown", "JSON", "comment", "blank", "total"
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\details.md", "Markdown", 0, 0, 0, 60, 0, 0, 6, 66
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md", "Markdown", 0, 0, 0, 9, 0, 0, 6, 15
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff.md", "Markdown", 0, 0, 0, 12, 0, 0, 7, 19
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.json", "JSON", 0, 0, 0, 0, 1, 0, 0, 1
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.md", "Markdown", 0, 0, 0, 39, 0, 0, 7, 46
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\details.md", "Markdown", 0, 0, 0, 71, 0, 0, 6, 77
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md", "Markdown", 0, 0, 0, 52, 0, 0, 6, 58
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff.md", "Markdown", 0, 0, 0, 31, 0, 0, 7, 38
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.json", "JSON", 0, 0, 0, 0, 1, 0, 0, 1
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.md", "Markdown", 0, 0, 0, 44, 0, 0, 7, 51
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\details.md", "Markdown", 0, 0, 0, 93, 0, 0, 6, 99
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff-details.md", "Markdown", 0, 0, 0, 91, 0, 0, 6, 97
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff.md", "Markdown", 0, 0, 0, 54, 0, 0, 7, 61
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.json", "JSON", 0, 0, 0, 0, 1, 0, 0, 1
"d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.md", "Markdown", 0, 0, 0, 57, 0, 0, 7, 64
"d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main.py", "Python", 0, 0, 14, 0, 0, 2, 10, 26
"d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main_debug.py", "Python", 0, 0, 12, 0, 0, 2, 10, 24
"d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main.py", "Python", 0, 0, 16, 0, 0, 2, 10, 28
"d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main_debug.py", "Python", 0, 0, 13, 0, 0, 2, 10, 25
"d:\Embedded\Projektarbeit-Rover\include\config.h", "C++", 0, 8, 0, 0, 0, 26, 5, 39
"d:\Embedded\Projektarbeit-Rover\include\moveControl.h", "C++", 0, 58, 0, 0, 0, 130, 28, 216
"d:\Embedded\Projektarbeit-Rover\include\moveControlConfig.h", "C++", 0, 21, 0, 0, 0, 18, 4, 43
"d:\Embedded\Projektarbeit-Rover\include\network.h", "C++", 0, 33, 0, 0, 0, 56, 16, 105
"d:\Embedded\Projektarbeit-Rover\include\networkConfig.h", "C++", 0, 98, 0, 0, 0, 37, 17, 152
"d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.cpp", "C++", 0, 107, 0, 0, 0, 13, 22, 142
"d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.h", "C++", 0, 55, 0, 0, 0, 65, 16, 136
"d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.cpp", "C++", 0, 56, 0, 0, 0, 10, 15, 81
"d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.h", "C++", 0, 25, 0, 0, 0, 10, 16, 51
"d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPadInput.h", "C++", 0, 50, 0, 0, 0, 10, 15, 75
"d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.cpp", "C++", 0, 45, 0, 0, 0, 0, 12, 57
"d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.h", "C++", 0, 21, 0, 0, 0, 0, 10, 31
"d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.cpp", "C++", 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.h", "C++", 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.cpp", "C++", 0, 45, 0, 0, 0, 10, 12, 67
"d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.h", "C++", 0, 25, 0, 0, 0, 41, 15, 81
"d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.cpp", "C++", 0, 81, 0, 0, 0, 12, 17, 110
"d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.h", "C++", 0, 41, 0, 0, 0, 120, 18, 179
"d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.cpp", "C++", 0, 142, 0, 0, 0, 24, 35, 201
"d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.h", "C++", 0, 48, 0, 0, 0, 102, 22, 172
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.cpp", "C++", 0, 192, 0, 0, 0, 29, 47, 268
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.h", "C++", 0, 68, 0, 0, 0, 141, 36, 245
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.cpp", "C++", 0, 125, 0, 0, 0, 22, 34, 181
"d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.h", "C++", 0, 71, 0, 0, 0, 135, 35, 241
"d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.cpp", "C++", 0, 198, 0, 0, 0, 23, 46, 267
"d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.h", "C++", 0, 51, 0, 0, 0, 63, 18, 132
"d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.cpp", "C++", 0, 109, 0, 0, 0, 18, 32, 159
"d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.h", "C++", 0, 51, 0, 0, 0, 100, 28, 179
"d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.cpp", "C++", 0, 28, 0, 0, 0, 10, 9, 47
"d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.h", "C++", 0, 19, 0, 0, 0, 45, 13, 77
"d:\Embedded\Projektarbeit-Rover\platformio.ini", "Ini", 26, 0, 0, 0, 0, 9, 5, 40
"d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.cpp", "C++", 0, 36, 0, 0, 0, 11, 13, 60
"d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.h", "C++", 0, 24, 0, 0, 0, 48, 14, 86
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.cpp", "C++", 0, 130, 0, 0, 0, 11, 19, 160
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.h", "C++", 0, 17, 0, 0, 0, 19, 8, 44
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.cpp", "C++", 0, 9, 0, 0, 0, 10, 4, 23
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.h", "C++", 0, 13, 0, 0, 0, 19, 8, 40
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.cpp", "C++", 0, 197, 0, 0, 0, 13, 55, 265
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.h", "C++", 0, 52, 0, 0, 0, 83, 22, 157
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.cpp", "C++", 0, 54, 0, 0, 0, 12, 11, 77
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.h", "C++", 0, 15, 0, 0, 0, 27, 9, 51
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformatio.cpp", "C++", 0, 34, 0, 0, 0, 15, 11, 60
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformation.h", "C++", 0, 14, 0, 0, 0, 21, 8, 43
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp", "C++", 0, 122, 0, 0, 0, 10, 24, 156
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h", "C++", 0, 14, 0, 0, 0, 31, 9, 54
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp", "C++", 0, 47, 0, 0, 0, 10, 13, 70
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h", "C++", 0, 13, 0, 0, 0, 31, 8, 52
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp", "C++", 0, 58, 0, 0, 0, 10, 16, 84
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h", "C++", 0, 14, 0, 0, 0, 27, 8, 49
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp", "C++", 0, 183, 0, 0, 0, 20, 40, 243
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.h", "C++", 0, 48, 0, 0, 0, 36, 16, 100
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.cpp", "C++", 0, 54, 0, 0, 0, 10, 16, 80
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.h", "C++", 0, 20, 0, 0, 0, 34, 11, 65
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.cpp", "C++", 0, 16, 0, 0, 0, 10, 5, 31
"d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.h", "C++", 0, 15, 0, 0, 0, 25, 8, 48
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.cpp", "C++", 0, 99, 0, 0, 0, 11, 25, 135
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.h", "C++", 0, 46, 0, 0, 0, 68, 18, 132
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilotConfig.h", "C++", 0, 9, 0, 0, 0, 36, 10, 55
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.cpp", "C++", 0, 63, 0, 0, 0, 10, 14, 87
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.h", "C++", 0, 34, 0, 0, 0, 62, 17, 113
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.cpp", "C++", 0, 1, 0, 0, 0, 10, 3, 14
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.h", "C++", 0, 6, 0, 0, 0, 10, 5, 21
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.cpp", "C++", 0, 26, 0, 0, 0, 15, 8, 49
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.h", "C++", 0, 30, 0, 0, 0, 49, 12, 91
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.cpp", "C++", 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.h", "C++", 0, 0, 0, 0, 0, 0, 1, 1
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.cpp", "C++", 0, 115, 0, 0, 0, 14, 27, 156
"d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.h", "C++", 0, 50, 0, 0, 0, 79, 24, 153
"d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.cpp", "C++", 0, 64, 0, 0, 0, 14, 21, 99
"d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.h", "C++", 0, 43, 0, 0, 0, 69, 17, 129
"d:\Embedded\Projektarbeit-Rover\src\driveModi\driveModi.h", "C++", 0, 9, 0, 0, 0, 22, 5, 36
"d:\Embedded\Projektarbeit-Rover\src\main.cpp", "C++", 0, 234, 0, 0, 0, 22, 47, 303
"d:\Embedded\Projektarbeit-Rover\src\moveControl.cpp", "C++", 0, 162, 0, 0, 0, 27, 39, 228
"d:\Embedded\Projektarbeit-Rover\src\network.cpp", "C++", 0, 113, 0, 0, 0, 17, 26, 156
"Total", "-", 26, 4174, 55, 613, 3, 2365, 1394, 8630
1 filename language Ini C++ Python Markdown JSON comment blank total
2 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\details.md Markdown 0 0 0 60 0 0 6 66
3 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md Markdown 0 0 0 9 0 0 6 15
4 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff.md Markdown 0 0 0 12 0 0 7 19
5 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.json JSON 0 0 0 0 1 0 0 1
6 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.md Markdown 0 0 0 39 0 0 7 46
7 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\details.md Markdown 0 0 0 71 0 0 6 77
8 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md Markdown 0 0 0 52 0 0 6 58
9 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff.md Markdown 0 0 0 31 0 0 7 38
10 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.json JSON 0 0 0 0 1 0 0 1
11 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.md Markdown 0 0 0 44 0 0 7 51
12 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\details.md Markdown 0 0 0 93 0 0 6 99
13 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff-details.md Markdown 0 0 0 91 0 0 6 97
14 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff.md Markdown 0 0 0 54 0 0 7 61
15 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.json JSON 0 0 0 0 1 0 0 1
16 d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.md Markdown 0 0 0 57 0 0 7 64
17 d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main.py Python 0 0 14 0 0 2 10 26
18 d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main_debug.py Python 0 0 12 0 0 2 10 24
19 d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main.py Python 0 0 16 0 0 2 10 28
20 d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main_debug.py Python 0 0 13 0 0 2 10 25
21 d:\Embedded\Projektarbeit-Rover\include\config.h C++ 0 8 0 0 0 26 5 39
22 d:\Embedded\Projektarbeit-Rover\include\moveControl.h C++ 0 58 0 0 0 130 28 216
23 d:\Embedded\Projektarbeit-Rover\include\moveControlConfig.h C++ 0 21 0 0 0 18 4 43
24 d:\Embedded\Projektarbeit-Rover\include\network.h C++ 0 33 0 0 0 56 16 105
25 d:\Embedded\Projektarbeit-Rover\include\networkConfig.h C++ 0 98 0 0 0 37 17 152
26 d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.cpp C++ 0 107 0 0 0 13 22 142
27 d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.h C++ 0 55 0 0 0 65 16 136
28 d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.cpp C++ 0 56 0 0 0 10 15 81
29 d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.h C++ 0 25 0 0 0 10 16 51
30 d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPadInput.h C++ 0 50 0 0 0 10 15 75
31 d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.cpp C++ 0 45 0 0 0 0 12 57
32 d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.h C++ 0 21 0 0 0 0 10 31
33 d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.cpp C++ 0 0 0 0 0 0 1 1
34 d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.h C++ 0 0 0 0 0 0 1 1
35 d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.cpp C++ 0 45 0 0 0 10 12 67
36 d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.h C++ 0 25 0 0 0 41 15 81
37 d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.cpp C++ 0 81 0 0 0 12 17 110
38 d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.h C++ 0 41 0 0 0 120 18 179
39 d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.cpp C++ 0 142 0 0 0 24 35 201
40 d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.h C++ 0 48 0 0 0 102 22 172
41 d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.cpp C++ 0 192 0 0 0 29 47 268
42 d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.h C++ 0 68 0 0 0 141 36 245
43 d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.cpp C++ 0 125 0 0 0 22 34 181
44 d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.h C++ 0 71 0 0 0 135 35 241
45 d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.cpp C++ 0 198 0 0 0 23 46 267
46 d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.h C++ 0 51 0 0 0 63 18 132
47 d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.cpp C++ 0 109 0 0 0 18 32 159
48 d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.h C++ 0 51 0 0 0 100 28 179
49 d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.cpp C++ 0 28 0 0 0 10 9 47
50 d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.h C++ 0 19 0 0 0 45 13 77
51 d:\Embedded\Projektarbeit-Rover\platformio.ini Ini 26 0 0 0 0 9 5 40
52 d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.cpp C++ 0 36 0 0 0 11 13 60
53 d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.h C++ 0 24 0 0 0 48 14 86
54 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.cpp C++ 0 130 0 0 0 11 19 160
55 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.h C++ 0 17 0 0 0 19 8 44
56 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.cpp C++ 0 9 0 0 0 10 4 23
57 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.h C++ 0 13 0 0 0 19 8 40
58 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.cpp C++ 0 197 0 0 0 13 55 265
59 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.h C++ 0 52 0 0 0 83 22 157
60 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.cpp C++ 0 54 0 0 0 12 11 77
61 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.h C++ 0 15 0 0 0 27 9 51
62 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformatio.cpp C++ 0 34 0 0 0 15 11 60
63 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformation.h C++ 0 14 0 0 0 21 8 43
64 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp C++ 0 122 0 0 0 10 24 156
65 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h C++ 0 14 0 0 0 31 9 54
66 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp C++ 0 47 0 0 0 10 13 70
67 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h C++ 0 13 0 0 0 31 8 52
68 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp C++ 0 58 0 0 0 10 16 84
69 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h C++ 0 14 0 0 0 27 8 49
70 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp C++ 0 183 0 0 0 20 40 243
71 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.h C++ 0 48 0 0 0 36 16 100
72 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.cpp C++ 0 54 0 0 0 10 16 80
73 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.h C++ 0 20 0 0 0 34 11 65
74 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.cpp C++ 0 16 0 0 0 10 5 31
75 d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.h C++ 0 15 0 0 0 25 8 48
76 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.cpp C++ 0 99 0 0 0 11 25 135
77 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.h C++ 0 46 0 0 0 68 18 132
78 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilotConfig.h C++ 0 9 0 0 0 36 10 55
79 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.cpp C++ 0 63 0 0 0 10 14 87
80 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.h C++ 0 34 0 0 0 62 17 113
81 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.cpp C++ 0 1 0 0 0 10 3 14
82 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.h C++ 0 6 0 0 0 10 5 21
83 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.cpp C++ 0 26 0 0 0 15 8 49
84 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.h C++ 0 30 0 0 0 49 12 91
85 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.cpp C++ 0 0 0 0 0 0 1 1
86 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.h C++ 0 0 0 0 0 0 1 1
87 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.cpp C++ 0 115 0 0 0 14 27 156
88 d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.h C++ 0 50 0 0 0 79 24 153
89 d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.cpp C++ 0 64 0 0 0 14 21 99
90 d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.h C++ 0 43 0 0 0 69 17 129
91 d:\Embedded\Projektarbeit-Rover\src\driveModi\driveModi.h C++ 0 9 0 0 0 22 5 36
92 d:\Embedded\Projektarbeit-Rover\src\main.cpp C++ 0 234 0 0 0 22 47 303
93 d:\Embedded\Projektarbeit-Rover\src\moveControl.cpp C++ 0 162 0 0 0 27 39 228
94 d:\Embedded\Projektarbeit-Rover\src\network.cpp C++ 0 113 0 0 0 17 26 156
95 Total - 26 4174 55 613 3 2365 1394 8630
File diff suppressed because one or more lines are too long
@@ -0,0 +1,69 @@
# Summary
Date : 2023-05-11 22:19:18
Directory d:\\Embedded\\Projektarbeit-Rover
Total : 93 files, 4871 codes, 2365 comments, 1394 blanks, all 8630 lines
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| C++ | 73 | 4,174 | 2,348 | 1,271 | 7,793 |
| Markdown | 12 | 613 | 0 | 78 | 691 |
| Python | 4 | 55 | 8 | 40 | 103 |
| Ini | 1 | 26 | 9 | 5 | 40 |
| JSON | 3 | 3 | 0 | 0 | 3 |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| . | 93 | 4,871 | 2,365 | 1,394 | 8,630 |
| . (Files) | 1 | 26 | 9 | 5 | 40 |
| .VSCodeCounter | 15 | 616 | 0 | 78 | 694 |
| .VSCodeCounter\\2022-01-19_11-26-30 | 5 | 121 | 0 | 26 | 147 |
| .VSCodeCounter\\2022-02-01_10-50-06 | 5 | 199 | 0 | 26 | 225 |
| .VSCodeCounter\\2022-12-09_11-39-58 | 5 | 296 | 0 | 26 | 322 |
| debugMqtt | 4 | 55 | 8 | 40 | 103 |
| debugMqtt\\hw1 | 2 | 26 | 4 | 20 | 50 |
| debugMqtt\\rhede | 2 | 29 | 4 | 20 | 53 |
| include | 5 | 218 | 267 | 70 | 555 |
| lib | 25 | 1,653 | 1,003 | 525 | 3,181 |
| lib\\Battery | 2 | 162 | 78 | 38 | 278 |
| lib\\ControllPad | 3 | 131 | 30 | 46 | 207 |
| lib\\Counter | 2 | 66 | 0 | 22 | 88 |
| lib\\Illumination | 2 | 0 | 0 | 2 | 2 |
| lib\\LcdWrapper | 2 | 70 | 51 | 27 | 148 |
| lib\\MQTT | 2 | 122 | 132 | 35 | 289 |
| lib\\MotorControl | 2 | 190 | 126 | 57 | 373 |
| lib\\Navigation | 4 | 456 | 327 | 152 | 935 |
| lib\\NtripClient | 2 | 249 | 86 | 64 | 399 |
| lib\\Speedometer | 2 | 160 | 118 | 60 | 338 |
| lib\\Times | 2 | 47 | 55 | 22 | 124 |
| src | 43 | 2,303 | 1,078 | 676 | 4,057 |
| src (Files) | 3 | 509 | 66 | 112 | 687 |
| src\\OutputBuf | 2 | 60 | 59 | 27 | 146 |
| src\\SpecialMenus | 22 | 1,139 | 484 | 329 | 1,952 |
| src\\SpecialMenus\\GPS | 2 | 147 | 30 | 27 | 204 |
| src\\SpecialMenus\\PID | 2 | 22 | 29 | 12 | 63 |
| src\\SpecialMenus\\Route | 4 | 318 | 135 | 97 | 550 |
| src\\SpecialMenus\\Systeminformation | 2 | 48 | 36 | 19 | 103 |
| src\\SpecialMenus\\driveModi | 12 | 604 | 254 | 174 | 1,032 |
| src\\SpecialMenus\\driveModi (Files) | 2 | 31 | 35 | 13 | 79 |
| src\\SpecialMenus\\driveModi\\Autopilot | 2 | 136 | 41 | 33 | 210 |
| src\\SpecialMenus\\driveModi\\CaptureRoute | 2 | 60 | 41 | 21 | 122 |
| src\\SpecialMenus\\driveModi\\ManualDrive | 2 | 72 | 37 | 24 | 133 |
| src\\SpecialMenus\\driveModi\\TestMode | 4 | 305 | 100 | 83 | 488 |
| src\\driveModi | 16 | 595 | 469 | 208 | 1,272 |
| src\\driveModi (Files) | 3 | 116 | 105 | 43 | 264 |
| src\\driveModi\\Modi | 13 | 479 | 364 | 165 | 1,008 |
| src\\driveModi\\Modi\\Autopilot | 3 | 154 | 115 | 53 | 322 |
| src\\driveModi\\Modi\\CaptureRoute | 2 | 97 | 72 | 31 | 200 |
| src\\driveModi\\Modi\\ConsolControl | 2 | 7 | 20 | 8 | 35 |
| src\\driveModi\\Modi\\ManualControl | 2 | 56 | 64 | 20 | 140 |
| src\\driveModi\\Modi\\Racing | 2 | 0 | 0 | 2 | 2 |
| src\\driveModi\\Modi\\TestMode | 2 | 165 | 93 | 51 | 309 |
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -0,0 +1,165 @@
Date : 2023-05-11 22:19:18
Directory : d:\Embedded\Projektarbeit-Rover
Total : 93 files, 4871 codes, 2365 comments, 1394 blanks, all 8630 lines
Languages
+----------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------+------------+------------+------------+------------+------------+
| C++ | 73 | 4,174 | 2,348 | 1,271 | 7,793 |
| Markdown | 12 | 613 | 0 | 78 | 691 |
| Python | 4 | 55 | 8 | 40 | 103 |
| Ini | 1 | 26 | 9 | 5 | 40 |
| JSON | 3 | 3 | 0 | 0 | 3 |
+----------+------------+------------+------------+------------+------------+
Directories
+----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| . | 93 | 4,871 | 2,365 | 1,394 | 8,630 |
| . (Files) | 1 | 26 | 9 | 5 | 40 |
| .VSCodeCounter | 15 | 616 | 0 | 78 | 694 |
| .VSCodeCounter\2022-01-19_11-26-30 | 5 | 121 | 0 | 26 | 147 |
| .VSCodeCounter\2022-02-01_10-50-06 | 5 | 199 | 0 | 26 | 225 |
| .VSCodeCounter\2022-12-09_11-39-58 | 5 | 296 | 0 | 26 | 322 |
| debugMqtt | 4 | 55 | 8 | 40 | 103 |
| debugMqtt\hw1 | 2 | 26 | 4 | 20 | 50 |
| debugMqtt\rhede | 2 | 29 | 4 | 20 | 53 |
| include | 5 | 218 | 267 | 70 | 555 |
| lib | 25 | 1,653 | 1,003 | 525 | 3,181 |
| lib\Battery | 2 | 162 | 78 | 38 | 278 |
| lib\ControllPad | 3 | 131 | 30 | 46 | 207 |
| lib\Counter | 2 | 66 | 0 | 22 | 88 |
| lib\Illumination | 2 | 0 | 0 | 2 | 2 |
| lib\LcdWrapper | 2 | 70 | 51 | 27 | 148 |
| lib\MQTT | 2 | 122 | 132 | 35 | 289 |
| lib\MotorControl | 2 | 190 | 126 | 57 | 373 |
| lib\Navigation | 4 | 456 | 327 | 152 | 935 |
| lib\NtripClient | 2 | 249 | 86 | 64 | 399 |
| lib\Speedometer | 2 | 160 | 118 | 60 | 338 |
| lib\Times | 2 | 47 | 55 | 22 | 124 |
| src | 43 | 2,303 | 1,078 | 676 | 4,057 |
| src (Files) | 3 | 509 | 66 | 112 | 687 |
| src\OutputBuf | 2 | 60 | 59 | 27 | 146 |
| src\SpecialMenus | 22 | 1,139 | 484 | 329 | 1,952 |
| src\SpecialMenus\GPS | 2 | 147 | 30 | 27 | 204 |
| src\SpecialMenus\PID | 2 | 22 | 29 | 12 | 63 |
| src\SpecialMenus\Route | 4 | 318 | 135 | 97 | 550 |
| src\SpecialMenus\Systeminformation | 2 | 48 | 36 | 19 | 103 |
| src\SpecialMenus\driveModi | 12 | 604 | 254 | 174 | 1,032 |
| src\SpecialMenus\driveModi (Files) | 2 | 31 | 35 | 13 | 79 |
| src\SpecialMenus\driveModi\Autopilot | 2 | 136 | 41 | 33 | 210 |
| src\SpecialMenus\driveModi\CaptureRoute | 2 | 60 | 41 | 21 | 122 |
| src\SpecialMenus\driveModi\ManualDrive | 2 | 72 | 37 | 24 | 133 |
| src\SpecialMenus\driveModi\TestMode | 4 | 305 | 100 | 83 | 488 |
| src\driveModi | 16 | 595 | 469 | 208 | 1,272 |
| src\driveModi (Files) | 3 | 116 | 105 | 43 | 264 |
| src\driveModi\Modi | 13 | 479 | 364 | 165 | 1,008 |
| src\driveModi\Modi\Autopilot | 3 | 154 | 115 | 53 | 322 |
| src\driveModi\Modi\CaptureRoute | 2 | 97 | 72 | 31 | 200 |
| src\driveModi\Modi\ConsolControl | 2 | 7 | 20 | 8 | 35 |
| src\driveModi\Modi\ManualControl | 2 | 56 | 64 | 20 | 140 |
| src\driveModi\Modi\Racing | 2 | 0 | 0 | 2 | 2 |
| src\driveModi\Modi\TestMode | 2 | 165 | 93 | 51 | 309 |
+----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
Files
+----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\details.md | Markdown | 60 | 0 | 6 | 66 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff-details.md | Markdown | 9 | 0 | 6 | 15 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\diff.md | Markdown | 12 | 0 | 7 | 19 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.json | JSON | 1 | 0 | 0 | 1 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-01-19_11-26-30\results.md | Markdown | 39 | 0 | 7 | 46 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\details.md | Markdown | 71 | 0 | 6 | 77 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff-details.md | Markdown | 52 | 0 | 6 | 58 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\diff.md | Markdown | 31 | 0 | 7 | 38 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.json | JSON | 1 | 0 | 0 | 1 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-02-01_10-50-06\results.md | Markdown | 44 | 0 | 7 | 51 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\details.md | Markdown | 93 | 0 | 6 | 99 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff-details.md | Markdown | 91 | 0 | 6 | 97 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\diff.md | Markdown | 54 | 0 | 7 | 61 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.json | JSON | 1 | 0 | 0 | 1 |
| d:\Embedded\Projektarbeit-Rover\.VSCodeCounter\2022-12-09_11-39-58\results.md | Markdown | 57 | 0 | 7 | 64 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main.py | Python | 14 | 2 | 10 | 26 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\hw1\main_debug.py | Python | 12 | 2 | 10 | 24 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main.py | Python | 16 | 2 | 10 | 28 |
| d:\Embedded\Projektarbeit-Rover\debugMqtt\rhede\main_debug.py | Python | 13 | 2 | 10 | 25 |
| d:\Embedded\Projektarbeit-Rover\include\config.h | C++ | 8 | 26 | 5 | 39 |
| d:\Embedded\Projektarbeit-Rover\include\moveControl.h | C++ | 58 | 130 | 28 | 216 |
| d:\Embedded\Projektarbeit-Rover\include\moveControlConfig.h | C++ | 21 | 18 | 4 | 43 |
| d:\Embedded\Projektarbeit-Rover\include\network.h | C++ | 33 | 56 | 16 | 105 |
| d:\Embedded\Projektarbeit-Rover\include\networkConfig.h | C++ | 98 | 37 | 17 | 152 |
| d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.cpp | C++ | 107 | 13 | 22 | 142 |
| d:\Embedded\Projektarbeit-Rover\lib\Battery\battery.h | C++ | 55 | 65 | 16 | 136 |
| d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.cpp | C++ | 56 | 10 | 15 | 81 |
| d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPad.h | C++ | 25 | 10 | 16 | 51 |
| d:\Embedded\Projektarbeit-Rover\lib\ControllPad\controlPadInput.h | C++ | 50 | 10 | 15 | 75 |
| d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.cpp | C++ | 45 | 0 | 12 | 57 |
| d:\Embedded\Projektarbeit-Rover\lib\Counter\counter.h | C++ | 21 | 0 | 10 | 31 |
| d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.cpp | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\lib\Illumination\underfloorLighting.h | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.cpp | C++ | 45 | 10 | 12 | 67 |
| d:\Embedded\Projektarbeit-Rover\lib\LcdWrapper\LcdWrapper.h | C++ | 25 | 41 | 15 | 81 |
| d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.cpp | C++ | 81 | 12 | 17 | 110 |
| d:\Embedded\Projektarbeit-Rover\lib\MQTT\debugMqtt.h | C++ | 41 | 120 | 18 | 179 |
| d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.cpp | C++ | 142 | 24 | 35 | 201 |
| d:\Embedded\Projektarbeit-Rover\lib\MotorControl\motorControl.h | C++ | 48 | 102 | 22 | 172 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.cpp | C++ | 192 | 29 | 47 | 268 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\navigation.h | C++ | 68 | 141 | 36 | 245 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.cpp | C++ | 125 | 22 | 34 | 181 |
| d:\Embedded\Projektarbeit-Rover\lib\Navigation\route.h | C++ | 71 | 135 | 35 | 241 |
| d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.cpp | C++ | 198 | 23 | 46 | 267 |
| d:\Embedded\Projektarbeit-Rover\lib\NtripClient\ntripClient.h | C++ | 51 | 63 | 18 | 132 |
| d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.cpp | C++ | 109 | 18 | 32 | 159 |
| d:\Embedded\Projektarbeit-Rover\lib\Speedometer\speedometer.h | C++ | 51 | 100 | 28 | 179 |
| d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.cpp | C++ | 28 | 10 | 9 | 47 |
| d:\Embedded\Projektarbeit-Rover\lib\Times\debugTimes.h | C++ | 19 | 45 | 13 | 77 |
| d:\Embedded\Projektarbeit-Rover\platformio.ini | Ini | 26 | 9 | 5 | 40 |
| d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.cpp | C++ | 36 | 11 | 13 | 60 |
| d:\Embedded\Projektarbeit-Rover\src\OutputBuf\outputBuf.h | C++ | 24 | 48 | 14 | 86 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.cpp | C++ | 130 | 11 | 19 | 160 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\GPS\menuGPS.h | C++ | 17 | 19 | 8 | 44 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.cpp | C++ | 9 | 10 | 4 | 23 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\PID\menuPidSettings.h | C++ | 13 | 19 | 8 | 40 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.cpp | C++ | 197 | 13 | 55 | 265 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoute.h | C++ | 52 | 83 | 22 | 157 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.cpp | C++ | 54 | 12 | 11 | 77 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Route\menuRoutePoints.h | C++ | 15 | 27 | 9 | 51 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformatio.cpp | C++ | 34 | 15 | 11 | 60 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\Systeminformation\menuSysteminformation.h | C++ | 14 | 21 | 8 | 43 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.cpp | C++ | 122 | 10 | 24 | 156 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\Autopilot\menuAutopilot.h | C++ | 14 | 31 | 9 | 54 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.cpp | C++ | 47 | 10 | 13 | 70 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\CaptureRoute\menuCaptureRoute.h | C++ | 13 | 31 | 8 | 52 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.cpp | C++ | 58 | 10 | 16 | 84 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\ManualDrive\menuManualDrive.h | C++ | 14 | 27 | 8 | 49 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.cpp | C++ | 183 | 20 | 40 | 243 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\menuTestMode.h | C++ | 48 | 36 | 16 | 100 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.cpp | C++ | 54 | 10 | 16 | 80 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\TestMode\speedometerTest.h | C++ | 20 | 34 | 11 | 65 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.cpp | C++ | 16 | 10 | 5 | 31 |
| d:\Embedded\Projektarbeit-Rover\src\SpecialMenus\driveModi\menuDriveMode.h | C++ | 15 | 25 | 8 | 48 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.cpp | C++ | 99 | 11 | 25 | 135 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilot.h | C++ | 46 | 68 | 18 | 132 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Autopilot\autopilotConfig.h | C++ | 9 | 36 | 10 | 55 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.cpp | C++ | 63 | 10 | 14 | 87 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\CaptureRoute\captureRoute.h | C++ | 34 | 62 | 17 | 113 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.cpp | C++ | 1 | 10 | 3 | 14 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ConsolControl\consolControl.h | C++ | 6 | 10 | 5 | 21 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.cpp | C++ | 26 | 15 | 8 | 49 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\ManualControl\manualControl.h | C++ | 30 | 49 | 12 | 91 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.cpp | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\Racing\racing.h | C++ | 0 | 0 | 1 | 1 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.cpp | C++ | 115 | 14 | 27 | 156 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\Modi\TestMode\testMode.h | C++ | 50 | 79 | 24 | 153 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.cpp | C++ | 64 | 14 | 21 | 99 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\driveManager.h | C++ | 43 | 69 | 17 | 129 |
| d:\Embedded\Projektarbeit-Rover\src\driveModi\driveModi.h | C++ | 9 | 22 | 5 | 36 |
| d:\Embedded\Projektarbeit-Rover\src\main.cpp | C++ | 234 | 22 | 47 | 303 |
| d:\Embedded\Projektarbeit-Rover\src\moveControl.cpp | C++ | 162 | 27 | 39 | 228 |
| d:\Embedded\Projektarbeit-Rover\src\network.cpp | C++ | 113 | 17 | 26 | 156 |
| Total | | 4,871 | 2,365 | 1,394 | 8,630 |
+----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
+1 -2
View File
@@ -3,11 +3,10 @@
.vscode/c_cpp_properties.json .vscode/c_cpp_properties.json
.vscode/launch.json .vscode/launch.json
.vscode/ipch .vscode/ipch
rover-cppcheck-build-dir
doc/Doxygen/html* doc/Doxygen/html*
doc/Doxygen/generated* doc/Doxygen/generated*
workspace.code-workspace workspace.code-workspace
projektarbeit.code-workspace projektarbeit.code-workspace
+60 -2
View File
@@ -1,5 +1,6 @@
{ {
"files.insertFinalNewline": true, "files.insertFinalNewline": true,
"editor.wordWrap": "on",
"cSpell.ignoreWords": [ "cSpell.ignoreWords": [
"ledc", "ledc",
"write" "write"
@@ -77,17 +78,62 @@
"istream": "cpp", "istream": "cpp",
"streambuf": "cpp", "streambuf": "cpp",
"functional": "cpp", "functional": "cpp",
"cmath": "cpp" "cmath": "cpp",
"atomic": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"limits": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp"
}, },
"cSpell.words": [ "cSpell.words": [
"Ahnung", "Ahnung",
"akku", "akku",
"ardui", "ardui",
"Baseclass",
"blox", "blox",
"bluedroid", "bluedroid",
"carr",
"CIPO", "CIPO",
"COPI", "COPI",
"Doxygen",
"Dutycycle",
"gast", "gast",
"gnss",
"GNSS", "GNSS",
"GPGGA", "GPGGA",
"HSPI", "HSPI",
@@ -95,17 +141,29 @@
"Keine", "Keine",
"kleiax", "kleiax",
"Lebennig", "Lebennig",
"microcontroller",
"Mqtt",
"MQTT",
"NMEA", "NMEA",
"NMEAGPGGA", "NMEAGPGGA",
"ntrip",
"Ntrip",
"NTRIP", "NTRIP",
"pcnt",
"pidl", "pidl",
"pidr", "pidr",
"Punica", "Punica",
"RHEDE", "RHEDE",
"Rtcm", "Rtcm",
"sapos",
"SAPOS",
"Schalke", "Schalke",
"Soln",
"Systeminformation",
"TPMOBIL", "TPMOBIL",
"UBLOX", "UBLOX",
"wheelspeed",
"ZLPJ" "ZLPJ"
] ],
"cmake.configureOnOpen": false
} }
+5
View File
@@ -0,0 +1,5 @@
# Autonomer Rover
Testfahrt auf Youtube: https://youtu.be/GigIyo-vghE?si=jhProl1DQFUrcz7w
# Beschreibung
Vollständige Softwarelösung und Hardwareerweiterungen für einen Rover mit Skid-Antrieb. Das System wurde in C++ geschrieben und es wurden erweiterte Konzepte der Objektorientierung wie Polymorphie eingesetzt. Die Datenhaltung wurde erfolgreich von der Logik getrennt, hierfür wurde unter anderem eine API mit Express.js implementiert. Hardwareseitig wurde PWM für die Motorsteuerung, IC2 für verschiedene Sensoren und SPI für das GNSS-Modul eingesetzt. Zusätzlich wurden Encoder an den Motoren verbaut, um diese präzise zu steuern. Überdies wurde eine RTK-Referenzstation geplant und umgesetzt, dafür wurde die Antenne, ein weiteres GNSS-Modul und ein Embedded-Server installiert und konfiguriert. Durch das Zusammenspiel dieser Systeme kann der Rover Routen im niedrigen einstelligen Zentimeterbereich aufzeichnen und abfahren.
Submodule autoVersionIncrement added at fd51b62f00
+6 -6
View File
@@ -44,14 +44,14 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short. # quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "A small verhicle which should be drive a route with GPS" PROJECT_BRIEF = "A small verhicle which should be drive a route with GNNS and RTK"
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included # With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55 # in the documentation. The maximum height of the logo should not exceed 55
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory. # the logo to the output directory.
PROJECT_LOGO = C:/Users/alex1/git/projektarbeit/doc/Doxygen/logo.png PROJECT_LOGO = logo.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is # into which the generated documentation will be written. If a relative path is
@@ -606,7 +606,7 @@ HIDE_COMPOUND_REFERENCE= NO
# will show which file needs to be included to use the class. # will show which file needs to be included to use the class.
# The default value is: YES. # The default value is: YES.
SHOW_HEADERFILE = YES # SHOW_HEADERFILE = YES
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
# the files that are included by a file in the documentation of that file. # the files that are included by a file in the documentation of that file.
@@ -824,7 +824,7 @@ WARN_IF_DOC_ERROR = YES
# parameters have no documentation without warning. # parameters have no documentation without warning.
# The default value is: YES. # The default value is: YES.
WARN_IF_INCOMPLETE_DOC = YES # WARN_IF_INCOMPLETE_DOC = YES
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return # are documented, but have no documentation for their parameters or return
@@ -1608,7 +1608,7 @@ GENERATE_TREEVIEW = YES
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
FULL_SIDEBAR = NO # FULL_SIDEBAR = NO
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
# doxygen will group on one line in the generated HTML documentation. # doxygen will group on one line in the generated HTML documentation.
@@ -1691,7 +1691,7 @@ USE_MATHJAX = NO
# The default value is: MathJax_2. # The default value is: MathJax_2.
# This tag requires that the tag USE_MATHJAX is set to YES. # This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_VERSION = MathJax_2 # MATHJAX_VERSION = MathJax_2
# When MathJax is enabled you can set the default output format to be used for # When MathJax is enabled you can set the default output format to be used for
# the MathJax output. For more details about the output format see MathJax # the MathJax output. For more details about the output format see MathJax
-9
View File
@@ -1,9 +0,0 @@
Added this code in SparkFun_u-blox_GNSS_Arduino_Libary.cpp in the function pushRawData.
_spiPort->beginTransaction(SPISettings(_spiSpeed, MSBFIRST, SPI_MODE0));
digitalWrite(_csPin, LOW);
for (uint16_t i = 0; i < numDataBytes; i++) {
spiTransfer(dataBytes[i]);
}
digitalWrite(_csPin, HIGH);
_spiPort->endTransaction();
-3
View File
@@ -1,3 +0,0 @@
-> Program underfloorLighting
-> Add an beeper
-> Program the beeper
-26
View File
@@ -1,26 +0,0 @@
ps3.h
void ps3ResetGlobals();
ps3.c
void ps3ResetGlobals() {
// Own Code
is_active = false;
ps3_connection_cb = NULL;
ps3_connection_object_cb = NULL;
ps3_connection_object = NULL;
ps3_event_cb = NULL;
ps3_event_object_cb = NULL;
ps3_event_object = NULL;
}
Ps3Controller.h
private
void resetGlobals();
Ps3Controller.cpp
void Ps3Controller::resetGlobals() {
ps3ResetGlobals();
}
in -> Ps3Controller::begin
this->resetGlobals();
-30
View File
@@ -1,30 +0,0 @@
ESP32 Rover Pinbelegung
3V3 GND
x 23 DirR1
x 22 PWMR
x TX PC
x RX PC Connector I2C
BATTERY 35 21 SDA SDA
INTL1 32 GND GND
INTL2 33 19 SCL SCL
INTR1 25 18 VCC
INTR2 26 5 SPI_CSK
DirL1 27 17 SPI_CS
DirR2 14 16 SPI_COPI
DirL2 12 4 SPI_CIPO
GND x
PWML 13 2 Probleme beim flashen
x 15 WS2812 LED ?
x x
CMD x
5V USB x
Connector Encoder
- 2 1 +
OB 4 3 -
3V3 6 [5] OA
8 7
10 9
+45
View File
@@ -0,0 +1,45 @@
Maybe:
-> Time Measurement in component interface
-> Time warnings
-> Blocking Battery Function in Battery class
- Callback function for output and shutdown things
Do later:
-> Program underfloorLighting
-> Add an beeper
-> Program the beeper
-> Engine slow down without curve in motorControl
-> Network clean up (Mqtt remove?)
-> Extra class for maneuver, autopilot should inherit from int16_t
-> Remote Control
- Leds for gnss rtk etc
- what happens exactly when no data is arriving
-> Test Menu for big curve driving
-> Api with Names and show on Maps in Browser
-> Menu structure mit add functions for each menu mit pointer return to config (additional not replace)
-> Menu Display from parent as run() to make Menu as Component
-> Racing Mode
-> ConsolControl
-> Menü für Einstellungen
- WiFi (save in Flash)
-> Battery
- tabelle mit eigenen Werten übergeben und nicht in header (wiederverwendbarkeit)
- kalibrierungsmethode mit Menü
- Daten in flash speichern können
-> Check speration between Ui and Route (RouteMenu)
-> update sparkfun gnss auf v3 für SPI korrekturdatenüvbetragung
-> Rover Objekt mit Error zustand freeze, damit das wenn möglich auch auf dem Display angezeigt wird.
-> ESP und Sensoren in den DeepSleep für Auschalten oder Akkuschutz
-> Doxygen comments
- navigation
- autopilot
Have to:
-> check new distance calculation between points
-> check new course calculation between points
-> menu route data und ui disconnecten
-> use routeCache in captureRoute and autopilot
-> make ntrip client useable without user and password
-> understand gyroscope offsets
-17
View File
@@ -1,17 +0,0 @@
Controller
PS3-Button: Change Mode
Mode: ManualControl
L3: Joystick Mode
Left Joystick: Drive
R3: Shoulder Trigger Mode
L2: Spin left side
R2: Spin right side
Mode: Autopilot
Mode: CaptureRoute
Mode: ConsolControl
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 MiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

+8
View File
@@ -0,0 +1,8 @@
// AUTO GENERATED FILE, DO NOT EDIT
#ifndef VERSION
#define VERSION "1.8.36"
#endif
#ifndef BUILD_TIMESTAMP
#define BUILD_TIMESTAMP "2023-10-13 15:13:34.491991"
#endif
+61 -19
View File
@@ -1,7 +1,7 @@
/** /**
* @file config.h * @file config.h
* @author Alexander Klein (alex@kleiax.de) * @author Alexander Klein (alex@kleiax.de)
* @brief Some defines to configere the project. * @brief Some defines to configure the project.
* @version 0.1 * @version 0.1
* @date 2022-02-15 * @date 2022-02-15
* *
@@ -9,30 +9,72 @@
* *
*/ */
#pragma once
/** /**
* @brief The MAC-Address saved in PS3-Controller * @brief The numbers of pins to be used
* *
* The PS3-Controller only connects to the address which is saved in it.
*/ */
#define CONTROLLER_MAC "24:62:AB:F2:4B:3A" namespace PinNumbers
{
constexpr uint8_t spiCopi = 16;
constexpr uint8_t spiCipo = 4;
constexpr uint8_t spiSck = 5;
constexpr uint8_t gnssSpiCs = 17;
constexpr uint8_t sda = 21;
constexpr uint8_t scl = 19;
constexpr uint8_t battery = 35;
namespace LeftMotor
{
constexpr uint8_t dir1 = 27;
constexpr uint8_t dir2 = 12;
constexpr uint8_t pwm = 13;
constexpr uint8_t encoder = 32;
constexpr uint8_t pmwChannel = 0;
}
namespace RightMotor
{
constexpr uint8_t dir1 = 14;
constexpr uint8_t dir2 = 23;
constexpr uint8_t pwm = 22;
constexpr uint8_t encoder = 33;
constexpr uint8_t pmwChannel = 1;
}
}
/** /**
* @brief Prevents creation of the global object * @brief Default values for different components
* *
* The PS3-Controller class creates a global object to use.
*/ */
#define NO_GLOBAL_INSTANCES namespace Settings
{
constexpr uint32_t baudRate = 115200;
constexpr uint32_t i2cSpeed = 400000;
/** constexpr float wheelDiameter = 0.105;
* @name SPI-Pins constexpr float wheelDistance = 0.255;
* @brief Pins for SPI communication with the gnss module constexpr uint16_t encoderSteps = 384;
*/
///@{
#define UBLOX_GNSS_SPI_CS 17
#define UBLOX_GNSS_SPI_COPI 16
#define UBLOX_GNSS_SPI_CIPO 4
#define UBLOX_GNSS_SPI_SCK 5
///@}
#define RF24_CSN_PIN 18 namespace Pid
#define RF24_CE_PIN 2 {
namespace Left
{
constexpr uint8_t P = 5;
constexpr uint8_t I = 0;
constexpr uint8_t D = 0;
}
namespace Right
{
constexpr uint8_t P = 5;
constexpr uint8_t I = 0;
constexpr uint8_t D = 0;
}
constexpr int8_t outMin = -100;
constexpr int8_t outMax = 100;
constexpr uint8_t sampleTime = 30;
}
}
+148 -160
View File
@@ -18,18 +18,19 @@
#include "motorControl.h" #include "motorControl.h"
#include "speedometer.h" #include "speedometer.h"
#include "moveControlConfig.h" #include "config.h"
#include "debugTimes.h" #include "debugTimes.h"
#include "component.h"
/** /**
* @brief used to set driving status * @brief A struct to easy set the speed
*
* When set to stop all motors are set to halt
* *
*/ */
enum DrivingStatus {stop, struct DrivingSpeeds
drive, {
raw}; double x;
double rot;
};
/** /**
* @brief This class manages the motors and the encoders * @brief This class manages the motors and the encoders
@@ -39,177 +40,164 @@ enum DrivingStatus {stop,
* given target speed to calculate a new duty cycle for the motors. * given target speed to calculate a new duty cycle for the motors.
* *
*/ */
class MoveControl { class MoveControl : public Component
public: {
/** public:
* @brief Construct a new Move Control object /**
* * @brief Used to set driving status
* Initialize the motors, encoders and PIDs with given *
* values in moveControlConfig.h * When set to stop all motors are set to halt
*/ *
MoveControl(); * When set to Raw the PIDs are not used. The target
* values must be given withe setRawPowerLeft() and
* setRawPowerRight().
*
* Drive is the normal working mode.
*
*/
enum Status
{
Stop,
Drive,
Raw
};
/** /**
* @brief Destroy the Move Control object * @brief Construct a new Move Control object
* *
* Stops the motors with emergencyStop() * Initialize the motors, encoders and PIDs with given
*/ * values in config.h
~MoveControl(); */
MoveControl();
/** /**
* @brief Calls runMoveControl() to update all Values. * @brief Destroy the Move Control object
* *
* Besides that this function calls the loop() functions for the motors and encodes. * Stops the motors with emergencyStop()
* This function should be called every mainloop. If the delay is not reached, than the */
* functions returns immediately. ~MoveControl();
* @see runMoveControl()
* @see setDelay()
*/
void loop();
/** /**
* @brief Normally called repeatedly by loop() to calculate new values. * @brief Set the Status
*/ *
void runMoveControl(); * Control if this component should work normally or with
* raw values for the motors.
*
* @see Status
* @param status
*/
void setDrivingStatus(Status status);
/** /**
* @brief Set the DrivingStatus * @brief Stops the engine immediately
* *
* @see DrivingStatus */
* @param status void emergencyStop();
*/
void setDrivingStatus(DrivingStatus status);
/** /**
* @brief Stops the engine immediately * @brief Set the target speed
* *
*/ * If the given speed is close to zero, then the
void emergencyStop(); * target speed is set to zero.
* @param speed in m/s
*/
void setSpeed(double speed);
/** /**
* @brief Set the target speed * @brief Set the rotationSpeed
* *
* If the given speed is close to zero, then the * If the given rotationSpeed is close to zero, then the
* target speed is set to zero. * target rotationSpeed is set to zero.
* @param speed in m/s * @param speed rad/s
*/ */
void setSpeed(double speed); void setRotationSpeed(double speed);
/** /**
* @brief Set the rotationspeed * @brief Set the speeds
* *
* If the given rotationspeed is close to zero, then the * This function is a combination of the functions setSpeed() and
* target rotationspeed is set to zero. * setRotationSpeed(). The struct DrivingSpeeds
* @param speed rad/s * is used for this.
*/ *
void setRotationSpeed(double speed); *
* @param drivingSpeeds
*/
void setSpeeds(DrivingSpeeds drivingSpeeds);
/** /**
* @brief Set Raw Power Left * @brief Set raw power left
* *
* This value has only an effect if DrivingStatus is raw. * This value has only an effect if the status is raw.
* * @see setDrivingStatus
* @param power between -100 and 100 *
*/ * @param power between -100 and 100
void setRawPowerLeft(int16_t power); */
void setRawPowerLeft(int16_t power);
/** /**
* @brief Set the Raw Power Right * @brief Set the raw power right
* *
* This value has only an effect if DrivingStatus is raw. * This value has only an effect if status is raw.
* *
* @param power between -100 and 100 * @param power between -100 and 100
*/ */
void setRawPowerRight(int16_t power); void setRawPowerRight(int16_t power);
/** /**
* @brief Set the pid tunings * @brief Set the pid tunings
* *
* @param side 0 -> left, 1 -> right * @param side 0 -> left, 1 -> right
* @param p * @param pPart
* @param i * @param iPart
* @param d * @param dPart
*/ */
void setPidTunings(uint8_t side, double p, double i, double d); void setPidTunings(uint8_t side, double pPart, double iPart, double dPart);
/** /**
* @brief Returns the PID object of the choosen side. * @brief Returns the PID object of the choosen side.
* *
* @param side 0 -> left, 1 -> right * @param side 0 -> left, 1 -> right
* @return PID* * @return PID*
*/ */
PID* getPID(uint8_t side); PID *getPID(uint8_t side) const;
/** Speedometer *getSpeedometerLeft() const { return this->leftSpeedometer; }
* @brief Get the Speedometer Left object Speedometer *getSpeedometerRight() const { return this->rightSpeedometer; }
*
* @return Speedometer*
*/
Speedometer* getSpeedometerLeft() const { return this->left_speedometer; }
/** uint16_t getDutycycleLeft() const { return this->leftMotor->getDutycycle(); }
* @brief Get the Speedometer Right object uint16_t getDutycycleRight() const { return this->rightMotor->getDutycycle(); }
*
* @return Speedometer*
*/
Speedometer* getSpeedometerRight() const { return this->right_speedometer; }
/** private:
* @brief Set the min delay between each loop void run() override;
* static void setSpeedometerDirection(Speedometer *speedometer, double value);
* @param delay_ time in Milliseconds void calcTargetWheelSpeed();
*/ void regulateMotors();
void setDelay(uint8_t delay) { this->delay = delay; } void updateCurrentWheelSpeed();
private: MotorControl *leftMotor;
void setSpeedometerDirection(Speedometer *speedometer, double value); MotorControl *rightMotor;
Speedometer *leftSpeedometer;
Speedometer *rightSpeedometer;
PID *leftPid;
PID *rightPid;
/** Status driving_status = Status::Stop;
* @brief Converts values into wheel speeds DrivingSpeeds drivingSpeeds = {0, 0};
*
* Converts target speed and target rotationspeed into
* wheel speeds
*/
void calcTargetWheelSpeed();
/** double wheelspeedLeftTarget = 0;
* @brief Set the target power to motors double wheelspeedRightTarget = 0;
* double wheelspeedLeft = 0;
* Checks if the driving_status is set to drive. double wheelspeedRight = 0;
* If yes, then the motors get the pid_out values as targetpower. double leftPidOut = 0;
* If no, then the motors target power is set to zero. double rightPidOut = 0;
*/
void regulateMotors();
/** uint8_t overTimeCounter = 0;
* @brief Updates the wheel speeds with speedometer uint8_t overTimeMax = 100;
*/ int8_t rawPowerLeft = 0;
void updateCurrentWheelSpeed(); int8_t rawPowerRight = 0;
MotorControl *left_motor; static constexpr int8_t maxPercentage = 100;
MotorControl *right_motor; static constexpr float minSpeed = 0.2;
Speedometer *left_speedometer; static constexpr uint8_t loopDelay = 20;
Speedometer *right_speedometer;
PID *left_pid;
PID *right_pid;
DrivingStatus driving_status = DrivingStatus::stop;
double x_speed = 0;
double rotation_speed = 0;
double wheelspeed_left_target = 0;
double wheelspeed_right_target = 0;
double wheelspeed_left = 0;
double wheelspeed_right = 0;
double left_pid_out;
double right_pid_out;
uint8_t delay = 20;
uint8_t overTimeCounter = 0;
uint8_t overTimeMax = 100;
int8_t rawPowerLeft = 0;
int8_t rawPowerRight = 0;
uint32_t lastMillis = 0;
}; };
#endif // MOVE_CONTROL_H #endif // MOVE_CONTROL_H
-42
View File
@@ -1,42 +0,0 @@
/**
* @file moveControlConfig.h
* @author Alexander Klein (alex@kleiax.de)
* @brief This file inherits some configurations for moveControl.h
* @version 0.1
* @date 2021-12-14
*
* @copyright Copyright (c) 2021
*
*/
//Pin config
//Left Motor
#define M_DIR_11 12
#define M_DIR_12 27
#define M_PWM_1 13
#define M_ENCODE_LEFT 26
//Right Motor
#define M_DIR_21 23
#define M_DIR_22 14
#define M_PWM_2 22
#define M_ENCODE_RIGHT 33
// PID config
#define PID_OUT_MIN -100
#define PID_OUT_MAX 100
#define PID_SAMPLETIME 30
// Left PID
#define PID_LEFT_P 75
#define PID_LEFT_I 0
#define PID_LEFT_D 0
// Right PID
#define PID_RIGHT_P 75
#define PID_RIGHT_I 0
#define PID_RIGHT_D 0
// PWM
#define PWM_CHANNEL_M1 0
#define PWM_CHANNEL_M2 1
// SPEEDOMETER
#define WHEEL_DIAMETER 0.1263
#define ENC_STEPS 360
-104
View File
@@ -1,104 +0,0 @@
/**
* @file network.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains the Network class.
* @version 0.1
* @date 2021-12-14
*
* @copyright Copyright (c) 2021
*
*/
#ifndef NETWORK_H
#define NETWORK_H
#include <iostream>
#include <WiFi.h>
#include <PubSubClient.h>
#include <esp_now.h>
#include "networkConfig.h"
typedef void (*recieveCallbackPtr) (const uint8_t * mac, const uint8_t *incomingData, int len);
typedef void (*sendCallbackPtr) (const uint8_t *mac_addr, esp_now_send_status_t status);
/**
* @brief This class handles all network stuff
*
* This class only inherits static functions and members and use
* only the configuration data is given by networkConfig.h
*
*/
class Network {
public:
/**
* @brief Set the all IPs needed by this class
*/
static void setIps();
/**
* @brief Establish a connection to the WiFi.
*
* @return true Wifi is connected
* @return false Timeout
*/
static bool connectWifi();
static bool connectEspNow(recieveCallbackPtr reci, sendCallbackPtr send);
/**
* @brief Set all general settings to connect to a broker.
*/
static void setupMQTT();
/**
* @brief Checks if mqtt is still connected
*
* If mqtt is not connect, this function try a reconnect
* with the function connectMQTT. This function should be
* called every mainloop.
*
* @return true if connected
* @return false if not connected
*/
static bool checkMQTT();
/**
* @brief Checks if WiFi is still connected
*
* If WiFi is not connected, this function try a reconnect.
* This function should be called every mainloop.
*/
static void checkWiFi();
/**
* @brief Get the Mqtt Client object
*
* @return PubSubClient*
*/
static PubSubClient* getMqttClient();
static const uint8_t * getBroadcastAddress() { return broadcastAddress; }
private:
/**
* @brief Tries a connect to the broker
*
* @return true if the connect attemp was successful
* @return false if the connect attemp was unsuccessful
*/
static bool connectMQTT();
static int32_t getWiFiChannel(const char *ssid);
static esp_now_peer_info_t peerInfo;
static uint8_t broadcastAddress[6];
static IPAddress local_IP;
static IPAddress gateway;
static IPAddress subnet;
static IPAddress mqtt_server;
static IPAddress dnsServer;
static WiFiClient wifi_client;
static PubSubClient* mqtt_client;
};
#endif // NETWORK_H
+85 -130
View File
@@ -12,140 +12,95 @@
* *
*/ */
// General config #include <stdint.h>
#define MQTT_TIME_RECONNECT 2500
/** #define ZUHAUSE
* @brief Wlan connect timeout #define SAPOS_NI
* // #define RTK2GO
* This number multiplied by WLAN_CONNECT_LOOP_TIME is the
* timeout in milliseconds.
*/
#define WLAN_CONNECT_TIMEOUT 20
/**
* @brief Wlan connect loop time
*
* The time in milliseconds until the next connection attempt.
*/
#define WLAN_CONNECT_LOOP_TIME 500
#define WLAN_DNS_SERVER "8.8.8.8"
#define ESP_NOW_CONTROLER_MAC {0xC8, 0xC9, 0xA3, 0xC8, 0x57, 0x10}
#define NTRIP_RTK2GO
// NTRIP config NRW
#ifdef NTRIP_NRW
#define NTRIP_HOST "www.sapos-nw-ntrip.de"
#define NTRIP_PORT 2101
#define NTRIP_MOUNT_POINT "VRS_3_3G_NW"
#define NTRIP_USER "nw-916771"
#define NTRIP_PASSWORD "Schalke#246"
#endif // NTRIP_NRW
// NTRIP config NS
#ifdef NTRIP_NS
#define NTRIP_HOST "openservice-sapos.niedersachsen.de"
#define NTRIP_PORT 2101
#define NTRIP_MOUNT_POINT "VRS_3_2G_NI"
#define NTRIP_USER "ni_FHDo01"
#define NTRIP_PASSWORD "ALdx-1-3e49"
#endif // NTRIP_NS
// NTRIP config RTK2Go
#ifdef NTRIP_RTK2GO
#define NTRIP_HOST "rtk2go.com"
#define NTRIP_PORT 2101
#define NTRIP_MOUNT_POINT "GER-Papenburg"
#define NTRIP_USER "alklein1@gmx.de"
#define NTRIP_PASSWORD "none"
#endif // NTRIP_RTK2GO
#define RHEDE
//Network config ESP32
#ifdef ESP32BROKER
#define WLAN_SSID "ESP32-Broker"
#define WLAN_PASSWORD "doit2022"
#define WLAN_IP "192.168.4.77"
#define WLAN_SUBNETMASK "255.255.255.0"
#define WLAN_GATEWAY "192.168.4.1"
#define MQTT_SERVER "192.168.4.1"
#define MQTT_PORT 1883
#endif //ESP32BROKER
//Network config Hotspot
#ifdef HOTSPOT #ifdef HOTSPOT
#define WLAN_SSID "Kleiax Handy" namespace NetworkConfig
#define WLAN_PASSWORD "12345677" {
#define WLAN_IP "192.168.43.4" const char ssid[] = "Nubsi";
#define WLAN_SUBNETMASK "255.255.128.0" const char password[] = "12345677";
#define WLAN_GATEWAY "192.168.43.1" const char ip[] = "192.168.72.7";
// Only for defines reasons const char subnet[] = "255.255.255.0";
#define MQTT_SERVER "172.22.64.216" const char gateway[] = "192.168.72.228";
#define MQTT_PORT 1883 const char dns[] = "8.8.8.8";
#endif //HOTSPOT const bool mqtt = false;
}
#endif // HOTSPOT
//Network config Rhede
#ifdef RHEDE
#define WLAN_SSID "LebennigHuus"
#define WLAN_PASSWORD "Punica-699"
#define WLAN_IP "192.168.11.4"
#define WLAN_SUBNETMASK "255.255.128.0"
#define WLAN_GATEWAY "192.168.0.1"
#define MQTT
#define MQTT_SERVER "192.168.1.7"
#define MQTT_PORT 1883
#define MQTT_AUTH
#define MQTT_USER "kleiax"
#define MQTT_PASSWORD "p?{$_~5%hBM7wrcFkr55KWr#"
#endif //RHEDE
//Network config Doro
#ifdef DORO
#define WLAN_SSID "Tuedelkram"
#define WLAN_PASSWORD "3Kaesehoch!"
#define WLAN_IP "192.168.178.4"
#define WLAN_SUBNETMASK "255.255.255.0"
#define WLAN_GATEWAY "192.168.178.1"
// Only for defines reasons
#define MQTT_SERVER "172.22.64.216"
#define MQTT_PORT 1883
#endif //DORO
//Network config HW1
#ifdef HW1 #ifdef HW1
#define WLAN_SSID "hw1_gast" namespace NetworkConfig
#define WLAN_PASSWORD "KeineAhnung" {
#define WLAN_IP "192.168.0.67" const char ssid[] = "hw1_gast";
#define WLAN_SUBNETMASK "255.255.255.0" const char password[] = "KeineAhnung";
#define WLAN_GATEWAY "192.168.0.1" const char ip[] = "192.168.0.4";
#define MQTT const char subnet[] = "255.255.255.0";
#define MQTT_SERVER "172.22.64.216" const char gateway[] = "192.168.0.1";
#define MQTT_PORT 1883 const char dns[] = "8.8.8.8";
#endif //HW1 const bool mqtt = false;
}
#endif // HW1
//Network config FRENZY // Network config Rhede
#ifdef FRENZY #ifdef RHEDE
#define WLAN_SSID "GNX7EDD84-2" namespace NetworkConfig
#define WLAN_PASSWORD "2W2ZLPJ9NVQ3" {
#define WLAN_IP 0x0F01a8c0 //192.168.1.15 const char ssid[] = "LebennigHuus";
#define WLAN_SUBNETMASK 0x00FFFFFF //255.255.255.0 const char password[] = "Punica-699";
#define MQTT const char ip[] = "192.168.11.4";
#define WLAN_GATEWAY 0xfe01a8c0 //192.168.1.254 const char subnet[] = "255.255.128.0";
#define MQTT_SERVER 0x0201a8c0 //192.168.1.2 const char gateway[] = "192.168.0.1";
#define MQTT_PORT 1883 const char dns[] = "8.8.8.8";
#endif //FRENZY const bool mqtt = true;
}
#endif // RHEDE
//Network config TPMOBIL #ifdef ZUHAUSE
#ifdef TPMOBIL namespace NetworkConfig
#define WLAN_SSID "TP-Mobil" {
#define WLAN_PASSWORD "Punica-699" const char ssid[] = "Tuedelkram";
#define WLAN_IP 0x0F01a8c0 //192.168.1.15 const char password[] = "3!Kaesehoch";
#define WLAN_SUBNETMASK 0x00FFFFFF //255.255.255.0 const char ip[] = "192.168.178.13";
#define WLAN_GATEWAY 0x0101a8c0 //192.168.1.1 const char subnet[] = "255.255.255.0";
#define MQTT const char gateway[] = "192.168.178.1";
#define MQTT_SERVER 0x0201a8c0 //192.168.1.2 const char dns[] = "8.8.8.8";
#define MQTT_PORT 1883 const bool mqtt = false;
#endif //TPMOBIL }
#endif // ZUHAUSE
namespace MqttConfig
{
const char server[] = "192.168.1.7";
const uint16_t port = 1883;
const char user[] = "kleiax";
const char password[] = "p?{$_~5%hBM7wrcFkr55KWr#";
}
#ifdef RTK2GO
namespace NtripConfig
{
const char host[] = "rtk2go.com";
const uint16_t port = 2101;
const char mountPoint[] = "GER-Dortmund";
// const char mountPoint[] = "GER-Papenburg";
// const char mountPoint[] = "Rtkramerntrip";
const char user[] = "alklein1@gmx.de";
const char password[] = "none";
const bool sendOwnPosition = false;
}
#endif // RTK2GO
#ifdef SAPOS_NI
namespace NtripConfig
{
const char host[] = "sapos-ni-ntrip.de";
const uint16_t port = 2101;
const char mountPoint[] = "VRS_3_4G_NI";
const char user[] = "ni_FHDo01";
const char password[] = "ALdx-1-3e49";
const bool sendOwnPosition = true;
}
#endif // RTK2GO
+206 -44
View File
@@ -11,67 +11,229 @@
#include "battery.h" #include "battery.h"
Battery::Battery(uint8_t pin, uint32_t r1, uint32_t r2) { Battery::Battery(uint8_t pin, uint32_t firstResistor, uint32_t secondResistor)
this->pin = pin; : pin{pin}, firstResistor{firstResistor}, secondResistor{secondResistor},
this->r1 = r1; batteryVoltageFactor{firstResistor + secondResistor / static_cast<double>(secondResistor)}
this->r2 = r2; {
this->calculateBatteryVoltage(); this->initBuffer();
Component::loopDelay = Battery::loopDelay;
} }
void Battery::loop() { Battery::Battery(uint8_t pin)
if (millis() - this->lastMillis < this->delay) : pin{pin}
{
this->initBuffer();
Component::loopDelay = Battery::loopDelay;
}
void Battery::run()
{
if (this->calibrationState != CalibrationState::None)
{
this->runCalibration();
return; return;
}
this->calculateBatteryVoltage(); this->readAdcToBuf();
this->calculateBatteryPercent(); this->loopCounter++;
this->lastMillis = millis(); if (this->loopCounter >= this->calculateDelayMultiplier)
{
this->calculateBatteryVoltage();
this->calculateBatteryPercent();
this->loopCounter = 0;
this->calculatedNewValues = true;
}
} }
double Battery::getBatteryVoltage() { void Battery::runCalibration()
double res = this->batteryVoltage; {
return (int)(res*100+0.5)/100.0; if (this->calibrationState != CalibrationState::Reading)
{
return;
}
this->readAdcToBuf();
if (this->bufferPos == 0)
{
const uint16_t res = this->getBufAvg();
this->newRawAdcVoltages[this->currentCalibrationVoltage] = res;
std::cout << "Index: "
<< (int)this->currentCalibrationVoltage
<< " Value: "
<< (int)res
<< std::endl;
this->currentCalibrationVoltage++;
this->calibrationState = CalibrationState::Waiting;
if (this->currentCalibrationVoltage == Battery::rawAdcVoltagesCount)
{
this->calibrationState = CalibrationState::Finished;
}
}
} }
bool Battery::isBatteryLow(uint8_t percent) { double Battery::getBatteryVoltage() const
if (this->getBatteryPercent() <= percent && this->batteryVoltage > this->absurdLowVoltage) {
return static_cast<int>((this->batteryVoltage * 100 + 0.5)) / 100.0;
}
bool Battery::isBatteryLow(double voltage) const
{
if (this->getBatteryVoltage() <= voltage && this->batteryVoltage > this->absurdLowVoltage)
{
return true; return true;
}
return false; return false;
} }
double Battery::readInputVoltage() { bool Battery::isNewValue()
{
if (!this->calculatedNewValues)
{
return false;
}
this->calculatedNewValues = false;
return true;
}
void Battery::nextVoltageIsReady()
{
if (this->calibrationState == CalibrationState::Waiting)
{
this->calibrationState = CalibrationState::Reading;
}
}
void Battery::startCalibration()
{
this->calibrationState = CalibrationState::Waiting;
this->currentCalibrationVoltage = 0;
this->bufferPos = 0;
Component::loopDelay = Battery::loopDelay / 2;
this->newRawAdcVoltages = new uint16_t[Battery::rawAdcVoltagesCount];
}
void Battery::finishCalibration()
{
if (this->calibrationState != CalibrationState::None)
{
return;
}
delete[] this->newRawAdcVoltages;
this->calibrationState = CalibrationState::None;
Component::loopDelay = Battery::loopDelay;
}
double Battery::calculateInputVoltage()
{
// Reference voltage is 3v3 so maximum reading is 3v3 = 4095 in range 0 to 4095 // Reference voltage is 3v3 so maximum reading is 3v3 = 4095 in range 0 to 4095
double reading = analogRead(this->pin); double reading = this->getBufAvg();
if(reading < 1 || reading > 4095) return 0; if (reading < 1 || reading > Battery::adcMaxValue)
return - 0.000000000000016 * pow(reading,4) {
+ 0.000000000118171 * pow(reading,3) return 0;
- 0.000000301211691 * pow(reading,2) }
+ 0.001109019271794 * reading
+ 0.034143524634089; return -this->adcCurveCoefficient[0] * pow(reading, 4) + this->adcCurveCoefficient[1] * pow(reading, 3) - this->adcCurveCoefficient[2] * pow(reading, 2) + this->adcCurveCoefficient[3] * reading + this->adcCurveCoefficient[4];
} }
void Battery::calculateBatteryVoltage() { void Battery::calculateBatteryVoltage()
this->batteryVoltage = (readInputVoltage() * (double) (this->r1 + this->r2)) / (double) this->r2; {
} if (this->firstResistor && this->secondResistor)
{
this->batteryVoltage = this->calculateInputVoltage() * this->batteryVoltageFactor;
return;
}
void Battery::calculateBatteryPercent() { const uint16_t adcValue = this->getBufAvg();
int8_t size = sizeof(this->capacityVoltages) / sizeof(*this->capacityVoltages); if (adcValue < this->rawAdcVoltages[0])
uint8_t i; {
for (i = 0; i < size; i++) { this->batteryVoltage = -1;
if (this->batteryVoltage <= this->capacityVoltages[i]) return;
}
uint8_t index = 1;
for (; index < this->rawAdcVoltagesCount; index++)
{
if (adcValue < this->rawAdcVoltages[index])
{
break; break;
}
} }
const double indexDelta = this->rawAdcVoltages[index] - this->rawAdcVoltages[index - 1];
if (i == 0) { const double valueDelta = this->rawAdcVoltages[index] - adcValue;
if (this->batteryVoltage > 6) double voltage = this->startVoltage + (index - 1) * this->stepVoltage;
std::cout << "Critical low battery!" << std::endl; voltage += valueDelta / indexDelta * this->stepVoltage;
} else if (i == size - 1) { this->batteryVoltage = voltage;
}
} else {
double diffToLowerVal = this->batteryVoltage - this->capacityVoltages[i - 1]; void Battery::calculateBatteryPercent()
double diffToHigherVal = this->capacityVoltages[i] - this->batteryVoltage; {
if (diffToLowerVal > diffToHigherVal) int8_t size = sizeof(this->capacityVoltages) / sizeof(*this->capacityVoltages);
i--; uint8_t index = 0;
} for (; index < size; index++)
this->batteryPercent = i * (100 / (size - 1)); {
if (this->batteryVoltage <= this->capacityVoltages[index])
{
break;
}
}
if (index == 0)
{
if (this->batteryVoltage > this->absurdLowVoltage)
{
std::cout << "Critical low battery!" << std::endl;
}
}
else if (index == size - 1)
{
}
else
{
const double diffToLowerVal = this->batteryVoltage - this->capacityVoltages[index - 1];
const double diffToHigherVal = this->capacityVoltages[index] - this->batteryVoltage;
if (diffToLowerVal > diffToHigherVal)
{
index--;
}
}
this->batteryPercent = index * (100 / (size - 1));
}
void Battery::readAdcToBuf()
{
this->adcBuffer[this->bufferPos] = analogRead(this->pin);
this->bufferPos++;
if (this->bufferPos == Battery::bufferSize)
{
this->bufferPos = 0;
}
// std::cout << "Battery::readAdcToBuf added Value: " << this->adcBuffer[this->bufferPos] << std::endl;
}
void Battery::initBuffer()
{
for (uint8_t i = 0; i < Battery::bufferSize; i++)
{
this->adcBuffer[i] = 0;
}
}
uint16_t Battery::getBufAvg() const
{
uint32_t res = 0;
uint8_t emptyPos = 0;
for (uint8_t i = 0; i < Battery::bufferSize; i++)
{
if (this->adcBuffer[i] == 0)
{
emptyPos++;
}
res += this->adcBuffer[i];
}
return res / (Battery::bufferSize - emptyPos);
} }
+167 -77
View File
@@ -9,104 +9,194 @@
* *
*/ */
#ifndef AKKU_H #ifndef BATTERY_H
#define AKKU_H #define BATTERY_H
#include <stdint.h> #include <stdint.h>
#include <iostream> #include <iostream>
#include <math.h> #include <math.h>
#include <Arduino.h> #include <Arduino.h>
#include "component.h"
/** /**
* @brief A class for battery monitoring * @brief A class for battery monitoring
* *
* This class reads the voltage from an analog pin to calculate the * This class reads the voltage from an analog pin to calculate the
* charge level of a 3 Cell Li-Poly battery pack. The battery pack have * charge level of a 3 Cell Li-Poly battery pack. The battery pack have
* to be after a voltage diveder, so that maximum voltage for the * to be after a voltage divider, so that maximum voltage for the
* microcontroller is 3.3 Volt. * microcontroller is 3.3 Volt.
*/ */
class Battery { class Battery : public Component
public: {
/** public:
* @brief Construct a new Battery object /**
* * @brief States when the calibration modes is active
* The voltage devider have to be calculated, so that the input *
* voltage from 3.3 Volt is never exceeded. It is assumed that * - None means that no calibration is running
* the microcontroller is connected to the second resistor. * - Reading means that the adc takes multiple values to calculate an average
* * - Waiting means that the user has to set the new wanted voltage
* @param pin The analog to read from. * - Finished means that all measurements was taken
* @param r1 First resistor of the voltage devider. */
* @param r2 Second resistor of the voltage devider. enum CalibrationState
*/ {
Battery(uint8_t pin, uint32_t r1, uint32_t r2); None,
Reading,
Waiting,
Finished
};
/** /**
* @brief Read new values if the delay is reached. * @brief Construct a new Battery object
*/ *
void loop(); * The voltage divider have to be calculated, so that the input
* voltage from 3.3 Volt is never exceeded. It is assumed that
* the microcontroller is connected to the second resistor.
*
* @param pin The analog to read from.
* @param firstResistor First resistor of the voltage divider.
* @param secondResistor Second resistor of the voltage divider.
*/
Battery(uint8_t pin, uint32_t firstResistor, uint32_t secondResistor);
/** /**
* @brief Set the delay to wait befor new values are read * @brief Construct a new Battery object
* *
* @param delay in milliseconds * With this constructor the real voltage is not calculated with the
*/ * voltage divider but with a table which contains the raw reading from
void setDelay(uint16_t delay) {this->delay = delay; } * the adc mapped to a specific voltage
*
* @param pin
*/
Battery(uint8_t pin);
/** /**
* @brief Get the delay to wait befor new values are read * @brief Get the battery voltage
* *
* @return uint16_t delay in milliseconds * @return double in Volt
*/ */
uint16_t getDelay() {return this->delay; } double getBatteryVoltage() const;
/** /**
* @brief Get the battery voltage * @brief Get the charge level of the battery
* *
* @return double in Volt * @return uint8_t charge level in percent
*/ */
double getBatteryVoltage(); uint8_t getBatteryPercent() const { return this->batteryPercent; }
/** /**
* @brief Get the charge level of the battery * @brief Checks if the battery is low.
* *
* @return uint8_t charge level in percent * The function will also return false if the battery voltage is
*/ * absurd low. This is for the case that the uController is powered
uint8_t getBatteryPercent() {return this->batteryPercent;} * by usb and no battery is connected.
*
* @param voltage the limit the battery have to
* @return true if the battery is low
* @return false if the battery is high
*/
bool isBatteryLow(double voltage) const;
/** /**
* @brief Checks if the battery is low. * @brief Check if a new voltage was been calculated
* *
* The function will also return false if the battery voltage is * @return true
* absurd low. This is for the case that the uController is powered * @return false
* by usb and no battery is connected. */
* bool isNewValue();
* @param percent the limit the battery have to
* @return true if the battery is low
* @return false if the battery is high
*/
bool isBatteryLow(uint8_t percent);
private: // Calibration
double readInputVoltage(); CalibrationState getCalibrationState() const { return this->calibrationState; }
void calculateBatteryVoltage();
void calculateBatteryPercent();
uint8_t absurdLowVoltage = 5; /**
uint8_t pin; * @brief Get the current calibration voltage target
uint8_t batteryPercent; *
uint8_t batteryLowPercent = 10; * The returned value stand for the index of the table for this reason
uint16_t delay = 20000; * the real value have to be calculated. After the returned voltage has been set
uint32_t r1; * you have to call nextVoltageIsReady().
uint32_t r2; *
uint64_t lastMillis = 0; * @return uint8_t voltage multiply with 0,1 and add 7
double batteryVoltage; */
uint8_t getCurrentCalibrationVoltage() const { return this->currentCalibrationVoltage; }
const float capacityVoltages[21] = {9.82, 10.83, 11.06, 11.12, // 0 5 10 15 /**
11.18, 11.24, 11.3, 11.36, // 20 25 30 35 * @brief Read next wanted voltage
11.39, 11.45, 11.51, 11.56, // 40 45 50 55 *
11.62, 11.74, 11.86, 11.95, // 60 65 70 75 * If this function is called, the calibration mode reads the new voltage
12.07, 12.25, 12.33, 12.45, // 80 85 90 95 * and save the value in the table.
12.6 }; */
void nextVoltageIsReady();
/**
* @brief Calibrate the battery readings
*
* This calibration has only an effect if the Component
* uses the table with the raw adc values. The calibration gives
* the user different voltages that have to be set with a
* laboratory power supply. The power supply have to be connected
* instead of the battery.
*/
void startCalibration();
/**
* @brief abort the calibration
*/
void finishCalibration();
private:
void run() override;
void runCalibration();
double calculateInputVoltage();
void calculateBatteryVoltage();
void calculateBatteryPercent();
void readAdcToBuf();
void initBuffer();
uint16_t getBufAvg() const;
static constexpr uint8_t bufferSize = 30;
static constexpr uint8_t loopDelay = 100;
static constexpr uint16_t adcMaxValue = 4095;
CalibrationState calibrationState = CalibrationState::None;
uint8_t absurdLowVoltage = 5;
uint8_t pin;
uint8_t batteryPercent = 0;
uint8_t batteryLowPercent = 10;
uint8_t bufferPos = 0;
uint8_t calculateDelayMultiplier = 5;
uint8_t loopCounter = 0;
uint8_t currentCalibrationVoltage = 0; // *0.1 + 7
uint16_t adcBuffer[bufferSize];
uint16_t *newRawAdcVoltages = nullptr;
uint32_t firstResistor = 0;
uint32_t secondResistor = 0;
bool calculatedNewValues = false;
double batteryVoltage = 0;
double batteryVoltageFactor;
const float capacityVoltages[21] = {9.82, 10.83, 11.06, 11.12, // 0 5 10 15
11.18, 11.24, 11.3, 11.36, // 20 25 30 35
11.39, 11.45, 11.51, 11.56, // 40 45 50 55
11.62, 11.74, 11.86, 11.95, // 60 65 70 75
12.07, 12.25, 12.33, 12.45, // 80 85 90 95
12.6};
static constexpr uint8_t rawAdcVoltagesCount = 60;
const double startVoltage = 7;
const double stepVoltage = 0.1;
const uint16_t rawAdcVoltages[rawAdcVoltagesCount] = // from 7.0V to 12.9V in 0.1V steps
{1992, 2021, 2056, 2090, 2118, 2145, 2177, 2208, 2241, 2272,
2298, 2331, 2362, 2387, 2420, 2453, 2482, 2514, 2543, 2577,
2607, 2640, 2670, 2703, 2736, 2763, 2794, 2826, 2858, 2890,
2920, 2956, 2983, 3019, 3054, 3088, 3121, 3158, 3189, 3226,
3264, 3300, 3339, 3379, 3414, 3453, 3500, 3544, 3598, 3636,
3682, 3730, 3781, 3837, 3887, 3943, 3997, 4054, 4093, 4095};
const double adcCurveCoefficient[5] = {0.000000000000016,
0.000000000118171,
0.000000301211691,
0.001109019271794,
0.034143524634089};
}; };
#endif // AKKU_H #endif // BATTERY_H
+121
View File
@@ -0,0 +1,121 @@
/**
* @file calcAzimuth.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-03
*
* @copyright Copyright (c) 2023
*
*/
#include "calcAzimuth.h"
CalcAzimuth::CalcAzimuth(Point point)
: lastChangePoint{point}, currentPosition{point}
{
Component::loopDelay = CalcAzimuth::loopDelay;
}
void CalcAzimuth::drivingDirectionChange(Point point)
{
if (point.isInit() && point.isValid())
{
this->directionChangeMode = true;
this->lastChangePoint = point;
this->state = State::Invalid;
}
}
void CalcAzimuth::updateCurrentPosition(Point point)
{
this->currentPosition = point;
this->positionChanged = true;
}
String CalcAzimuth::stateToString(State state)
{
switch (state)
{
case State::Invalid:
return "Invalid";
case State::Bad:
return "Bad";
case State::Ok:
return "Ok";
case State::Good:
return "Good";
case State::Super:
return "Super";
default:
return "UNKOWN";
}
}
void CalcAzimuth::run()
{
if (!this->positionChanged)
{
return;
}
this->positionChanged = false;
this->updateAzimuth();
}
void CalcAzimuth::updateAzimuth()
{
if (!this->directionChangeMode || this->lastChangePoint.distanceTo(this->currentPosition) < 1.0)
{
this->state = State::Invalid;
this->calcAzimuth = INT16_MIN;
return;
}
this->calcAzimuth = this->lastChangePoint.courseTo(this->currentPosition);
// Map point accuracy to State
if (this->lastChangePoint.getAccuracy() == Point::Accuracy::oneDigOfCM || this->currentPosition.getAccuracy() == Point::Accuracy::oneDigOfCM)
{
this->state = State::Good;
}
else if (this->lastChangePoint.getAccuracy() == Point::Accuracy::twoDigOfCM || this->currentPosition.getAccuracy() == Point::Accuracy::twoDigOfCM)
{
this->state = State::Ok;
}
else if (this->lastChangePoint.getAccuracy() == Point::Accuracy::threeDigOfCM || this->currentPosition.getAccuracy() == Point::Accuracy::threeDigOfCM)
{
this->state = State::Bad;
}
else
{
this->state = State::Invalid;
}
// Upgrade quality if the range grows up
if (this->lastChangePoint.distanceTo(this->currentPosition) > this->minDistanceForBetterQuality)
{
switch (this->state)
{
case State::Bad:
this->state = State::Ok;
break;
case State::Ok:
this->state = State::Good;
break;
case State::Good:
this->state = State::Super;
break;
default:
break;
}
}
}
+93
View File
@@ -0,0 +1,93 @@
/**
* @file calcAzimuth.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a class that calculates the azimuth from a last and a current position
* @version 0.1
* @date 2023-09-03
*
* @copyright Copyright (c) 2023
*
*/
#ifndef CALC_AZIMUTH_H
#define CALC_AZIMUTH_H
#include "component.h"
#include "point.h"
/**
* @brief A class to calculate an azimuth
*
* This class calculates the current Azimuth with the last position
* where the rover has been rotated and the current position
*/
class CalcAzimuth : public Component
{
public:
/**
* @brief States which represent the quality of the current calculated azimuth
*/
enum State
{
Invalid,
Bad,
Ok,
Good,
Super
};
/**
* @brief Construct a new Calc Azimuth object
*
* @param point current position
*/
CalcAzimuth(Point point);
/**
* @brief Have to be called if the rover rotates
*
* @param point current position
*/
void drivingDirectionChange(Point point);
/**
* @brief update the current position
*
* This function should be called if the rover has moved in
* a straight direction, to calculated the current Azimuth.
* More distance to the point given to drivingDirectionChange()
* increase the accuracy of the calculation.
*
* @param point current position
*/
void updateCurrentPosition(Point point);
void disableCalcAzimuth() { this->directionChangeMode = false; }
int16_t getAzimuth() const { return this->calcAzimuth; }
/**
* @brief Get the State struct
*
* @return State current quality of the calculation
*/
State getState() const { return this->state; }
static String stateToString(State state);
private:
void run() override;
void updateAzimuth();
State state = State::Invalid;
Point lastChangePoint;
Point currentPosition;
bool positionChanged = false;
bool directionChangeMode = false;
int16_t calcAzimuth = INT16_MAX;
double minDistanceForBetterQuality = 2;
static constexpr uint8_t loopDelay = 50;
};
#endif // CALC_AZIMUTH_H
+206
View File
@@ -0,0 +1,206 @@
/**
* @file calibrateCompass.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-05-23
*
* @copyright Copyright (c) 2023
*
*/
#include "calibrateCompass.h"
CalibrateCompass::CalibrateCompass(QMC5883LCompass *compass)
: compass{compass}
{
this->state = State::Ready;
this->clearData();
this->activateOnlyChilds();
}
void CalibrateCompass::runAsChild()
{
if (this->state != State::Calibrating)
{
return;
}
bool changed = false;
this->compass->read();
const int xAxis = this->compass->getX();
const int yAxis = this->compass->getY();
const int zAxis = this->compass->getZ();
if (xAxis < this->data.data[0][0])
{
this->data.data[0][0] = xAxis;
changed = true;
}
if (xAxis > this->data.data[0][1])
{
this->data.data[0][1] = xAxis;
changed = true;
}
if (yAxis < this->data.data[1][0])
{
this->data.data[1][0] = yAxis;
changed = true;
}
if (yAxis > this->data.data[1][1])
{
this->data.data[1][1] = yAxis;
changed = true;
}
if (zAxis < this->data.data[2][0])
{
this->data.data[2][0] = zAxis;
changed = true;
}
if (zAxis > this->data.data[2][1])
{
this->data.data[2][1] = zAxis;
changed = true;
}
if (changed)
{
this->lastChange = millis();
}
if (millis() - this->lastChange > this->maxTimeWithoutChange)
{
this->state = State::Finished;
this->checkDataValidity();
}
}
void CalibrateCompass::run() {}
void CalibrateCompass::start()
{
if (this->state != State::Ready)
{
return;
}
this->clearData();
this->state = State::Calibrating;
this->compass->clearCalibration();
this->lastChange = millis();
}
void CalibrateCompass::useData()
{
if (!this->dataValid)
{
std::cout << "CalibrateCompass::useData - Data not valid" << std::endl;
return;
}
this->compass->setCalibration(this->data.data[0][0],
this->data.data[0][1],
this->data.data[1][0],
this->data.data[1][1],
this->data.data[2][0],
this->data.data[2][1]);
std::cout << "CalibrateCompass::useData " << *this << std::endl;
}
void CalibrateCompass::removeCalibration()
{
this->compass->clearCalibration();
}
void CalibrateCompass::reset()
{
this->clearData();
this->state = State::Ready;
}
void CalibrateCompass::saveData()
{
if (!this->dataValid)
{
return;
}
Preferences preferences;
preferences.begin("compass", false);
preferences.putInt("xLow", this->data.data[0][0]);
preferences.putInt("xHigh", this->data.data[0][1]);
preferences.putInt("yLow", this->data.data[1][0]);
preferences.putInt("yHigh", this->data.data[1][1]);
preferences.putInt("zLow", this->data.data[2][0]);
preferences.putInt("zHigh", this->data.data[2][1]);
preferences.end();
}
void CalibrateCompass::loadData()
{
Preferences preferences;
preferences.begin("compass", true);
this->data.data[0][0] = preferences.getInt("xLow", 0);
this->data.data[0][1] = preferences.getInt("xHigh", 0);
this->data.data[1][0] = preferences.getInt("yLow", 0);
this->data.data[1][1] = preferences.getInt("yHigh", 0);
this->data.data[2][0] = preferences.getInt("zLow", 0);
this->data.data[2][1] = preferences.getInt("zHigh", 0);
preferences.end();
this->checkDataValidity();
}
void CalibrateCompass::clearData()
{
for (uint8_t i = 0; i < 3; i++)
{
this->data.data[i][0] = 0;
this->data.data[i][1] = 0;
}
this->dataValid = false;
}
void CalibrateCompass::checkDataValidity()
{
int sum = 0;
for (uint8_t i = 0; i < 3; i++)
{
if (this->data.data[i][0] > INT16_MAX || this->data.data[i][0] < INT16_MIN || this->data.data[i][1] > INT16_MAX || this->data.data[i][1] < INT16_MIN)
{
this->dataValid = false;
return;
}
sum += this->data.data[i][0];
sum += this->data.data[i][1];
}
this->dataValid = static_cast<bool>(sum);
}
std::ostream &operator<<(std::ostream &stream, const CalibrateCompass &caliComp)
{
stream << "(";
stream << caliComp.data.data[0][0];
stream << ", ";
stream << caliComp.data.data[0][1];
stream << ", ";
stream << caliComp.data.data[1][0];
stream << ", ";
stream << caliComp.data.data[1][1];
stream << ", ";
stream << caliComp.data.data[2][0];
stream << ", ";
stream << caliComp.data.data[2][1];
stream << ")";
return stream;
}
+110
View File
@@ -0,0 +1,110 @@
/**
* @file calibrateCompass.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a class to calibrate the compass module
* @version 0.1
* @date 2023-05-23
*
* @copyright Copyright (c) 2023
*
*/
#pragma once
#include <QMC5883LCompass.h>
#include <Preferences.h>
#include <iostream>
#include "component.h"
/**
* @brief A Class to calibrate the compass
*
* This class reads the raw values of the compass while
* the rove have to be moved. The lowest and highest values
* are used to calibrate the compass to the current location.
*/
class CalibrateCompass : public Component
{
public:
/**
* @brief State of the calibration process
*/
enum State
{
Ready,
Calibrating,
Finished
};
/**
* @brief Type for calibration data
*
* The data consist of 6 values. For each for the 3 axis
* are to integer needed.
*/
struct CalibrationData
{
int data[3][2];
};
CalibrateCompass(QMC5883LCompass *compass);
/**
* @brief Starts the calibration
*/
void start();
/**
* @brief Use the measured calibration data
*/
void useData();
/**
* @brief Remove the measured calibration data
*/
void removeCalibration();
/**
* @brief Reset the calibration process to start again
*/
void reset();
/**
* @brief Save the measured calibration data to the flash
*/
void saveData();
/**
* @brief Load the measured calibration data from the flash
*
*/
void loadData();
State getState() const { return this->state; }
CalibrationData getCalibrationData() const { return this->data; }
/**
* @brief Makes the calibration data printable with std::cout()
*
* @param stream
* @param caliComp
* @return std::ostream&
*/
friend std::ostream &operator<<(std::ostream &stream, const CalibrateCompass &caliComp);
private:
void runAsChild() override;
void run() override;
void checkDataValidity();
QMC5883LCompass *compass;
State state = State::Ready;
CalibrationData data{};
void clearData();
bool dataValid = false;
const uint16_t maxTimeWithoutChange = 10000;
uint32_t lastChange = 0;
};
+54
View File
@@ -0,0 +1,54 @@
#include "component.h"
Component::Component(uint16_t loopDelay) : loopDelay{loopDelay}
{
}
void Component::loop()
{
if (!this->active)
{
return;
}
if (this->childComponents.size())
{
std::list<Component *>::iterator it;
for (it = this->childComponents.begin(); it != this->childComponents.end(); it++)
{
(*it)->loop();
}
}
this->runAsChild();
if (this->onlyChilds)
{
return;
}
if (static_cast<bool>(this->loopDelay) && millis() - this->lastMillis < this->loopDelay)
{
return;
}
this->lastMillis = millis();
this->beforeRun();
this->run();
this->afterRun();
if (this->timeUpdateAfter)
{
this->lastMillis = millis();
}
}
void Component::addChildComponent(Component *child)
{
this->childComponents.push_back(child);
}
void Component::removeChildComponent(Component *child)
{
this->childComponents.remove(child);
}
+144
View File
@@ -0,0 +1,144 @@
/**
* @file component.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains an interface to make non blocking components with delay.
* @version 0.1
* @date 2023-08-16
*
* @copyright Copyright (c) 2023
*
*/
#pragma once
#include <Arduino.h>
#include <list>
/**
* @brief An Interface to make components
*
* A component is a task that be called in a loop which not
* runs every loop, so every component has a non blocking delay.
*
* A component can manage other components which called children components.
*/
class Component
{
public:
/**
* @brief Construct a new Component object
*
* With the default constructor the created component is
* by default inactive. This does not affect the execution of
* the children components.
*/
Component() {}
/**
* @brief Construct a new Component object
*
* If the given parameter is zero, there are no differences to the
* default constructor.
*
* @param loopDelay the minimum time in milliseconds before the task runs
*/
Component(uint16_t loopDelay);
/**
* @brief Runs the children components and the task
*
* The loop() function of the children is called every time this
* loop is called.
*
* The run() function which presents the task of this component is
* only called if the delay is reached.
*/
void loop();
/**
* @brief Deactivate this component
*
* If the component is deactivated the call of loop() ha no effect
*/
void deactivate() { this->active = false; }
void activate() { this->active = true; }
protected:
/**
* @brief Override this function to avoid the delay
*/
virtual void runAsChild() {}
/**
* @brief Runs befor the run() function
*
* This function is only called, if the delay
* is reached.
* The function do nothing, except the function is overwritten
* by the class which inherits this class.
*/
virtual void beforeRun() {}
/**
* @brief The actual task
*
* This function have to be overwritten by the inheriting class.
*/
virtual void run() = 0;
/**
* @brief Runs after the run() function
*
* This function is only called, if the delay
* is reached.
* The function do nothing, except the function is overwritten
* by the class which inherits this class.
*/
virtual void afterRun() {}
/**
* @brief Adds a child component
*
* The child component will be called every time the loop() function
* is called.
*
* @param child
*/
void addChildComponent(Component *child);
void removeChildComponent(Component *child);
void activateOnlyChilds() { this->onlyChilds = true; }
/**
* @brief Skip the actual task
*
* Same as set the loopDelay to zero.
*/
void deactivateOnlyChilds() { this->onlyChilds = false; }
/**
* @brief Set the timer after task
*
* If this function is called once the measurement of the delay
* starts after task has finished. The default is, that the
* measurement begins at the start of the task.
*/
void setTimerAfterTask() { this->timeUpdateAfter = true; }
/**
* @brief the minimum time in milliseconds before the task runs
*
* If this value is zero, the functions beforeRun(), run() and
* afterRun() would not be called
*/
uint16_t loopDelay = 0;
private:
std::list<Component *> childComponents;
bool active = true;
bool onlyChilds = false;
bool timeUpdateAfter = false;
uint32_t lastMillis = 0;
};
@@ -11,70 +11,82 @@
#include "controlPad.h" #include "controlPad.h"
ControlPad::ControlPad() { ControlPad::ControlPad() : Component(10), controlInput{0, 0, 0, 0} {}
} void ControlPad::run()
{
if (!this->connected)
{
return;
}
bool ControlPad::loop() { if (millis() - this->lastMessageReceive > this->disconnectTime)
if (millis() - this->lastLoopMillis < this->loopDelay) {
return false;
this->lastLoopMillis = millis();
if(!this->connected)
return false;
if (millis() - this->lastMessageReceive > this->disconnectTime) {
this->connected = false; this->connected = false;
this->controlInput.buttons = 0; this->controlInput.buttons = 0;
this->controlInput.x = 127; this->controlInput.x = UINT8_MAX / 2;
this->controlInput.y = 127; this->controlInput.y = UINT8_MAX / 2;
return false; return;
} }
if (this->lastButtons != controlInput.buttons) if (this->lastButtons != controlInput.buttons)
{
this->updated = true; this->updated = true;
}
if (this->menuControl && this->controlInput.buttons > 0 && this->updated) { if (static_cast<bool>(this->menuControl) && this->controlInput.buttons > 0 && this->updated)
if (this->firstButtonPress) { {
if (this->firstButtonPress)
{
this->menuControl->printMenu(); this->menuControl->printMenu();
this->firstButtonPress = false; this->firstButtonPress = false;
std::cout << "ControlPad::loop - First menu print" << std::endl; std::cout << "ControlPad::loop - First menu print" << std::endl;
return true; return;
} }
if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Left)) if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Left))
{
this->menuControl->left(); this->menuControl->left();
}
else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Right)) else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Right))
{
this->menuControl->right(); this->menuControl->right();
}
else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Up)) else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Up))
{
this->menuControl->up(); this->menuControl->up();
}
else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Down)) else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Down))
{
this->menuControl->down(); this->menuControl->down();
}
else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Yes)) else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::Yes))
{
this->menuControl->yes(); this->menuControl->yes();
}
else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::No)) else if (ControlPadButton::isControlPadButtonPressed(&this->controlInput, ControlPadButton::PadButton::No))
{
this->menuControl->no(); this->menuControl->no();
}
this->updated = false; this->updated = false;
this->lastButtons = controlInput.buttons; this->lastButtons = controlInput.buttons;
} }
return true;
} }
void ControlPad::insertData(const uint8_t *data) { void ControlPad::insertData(const uint8_t *data)
{
this->connected = true; this->connected = true;
this->lastMessageReceive = millis(); this->lastMessageReceive = millis();
uint8_t lastCount = this->controlInput.counter + 1; const uint8_t lastCount = this->controlInput.counter + 1;
memcpy(&(this->controlInput), data, sizeof(this->controlInput)); memcpy(&(this->controlInput), data, sizeof(this->controlInput));
if (lastCount != this->controlInput.counter) if (lastCount != this->controlInput.counter)
std::cout << "ControlPad::insertData counter wrong value" << std::endl; std::cout << "ControlPad::insertData counter wrong value" << std::endl;
if (this->controlInput.x > 127 - this->deadZoneX if (this->controlInput.x > UINT8_MAX / 2 - this->deadZoneX && this->controlInput.x < UINT8_MAX / 2 + this->deadZoneX)
&& this->controlInput.x < 127 + this->deadZoneX) this->controlInput.x = UINT8_MAX / 2;
this->controlInput.x = 127;
if (this->controlInput.y > 127 - this->deadZoneY if (this->controlInput.y > UINT8_MAX / 2 - this->deadZoneY && this->controlInput.y < UINT8_MAX / 2 + this->deadZoneY)
&& this->controlInput.y < 127 + this->deadZoneY) this->controlInput.y = UINT8_MAX / 2;
this->controlInput.y = 127;
} }
+80
View File
@@ -0,0 +1,80 @@
/**
* @file controlPad.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a class that gets the input data
* @version 0.1
* @date 2023-03-30
*
* @copyright Copyright (c) 2023
*
*/
#pragma once
#include <menuControl.h>
#include <controlPadInput.h>
#include <component.h>
/**
* @brief A class to manage inputs
*
* This class converts the incoming data to the buttons and
* the axis from the joystick. The converted data will be send
* to the menu.
*/
class ControlPad : public Component
{
public:
ControlPad();
/**
* @brief Insert the incoming data to convert
*
* The data is converted to the ControlPadInput struct.
*
* @param data have to be 4 byte long
*/
void insertData(const uint8_t *data);
/**
* @brief Set the MenuControl object
*
* The MenuControl object is used to control the Menu.
*
* @see Menu
* @see ControlPadInput
*
* @param menuControl
*/
void setMenuControl(MenuControl *menuControl) { this->menuControl = menuControl; }
/**
* @brief Get the Control Pad Data
*
* The pointer holds the lates data from the ControlPad
*
* @return const ControlPadInput*
*/
const ControlPadInput *getControlPadDataPtr() const { return &this->controlInput; }
bool isControlPadConnected() const { return this->connected; }
private:
void run() override;
MenuControl *menuControl = nullptr;
ControlPadInput controlInput;
bool connected = false;
bool updated = false;
bool firstButtonPress = true;
uint8_t deadZoneX = 20;
uint8_t deadZoneY = 20;
uint8_t lastButtons = 0;
uint16_t disconnectTime = 100;
uint32_t lastMessageReceive = 0;
};
+79
View File
@@ -0,0 +1,79 @@
/**
* @file controlPadInput.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-03-30
*
* @copyright Copyright (c) 2023
*
*/
#ifndef CONTROL_PAD_INPUT_H
#define CONTROL_PAD_INPUT_H
#include <stdint.h>
struct ControlPadInput
{
uint8_t buttons;
uint8_t x;
uint8_t y;
uint8_t counter;
};
class ControlPadButton
{
public:
enum PadButton
{
Left = 4,
Right = 8,
Up = 2,
Down = 1,
Yes = 32,
No = 16,
Action = 64
};
static bool isControlPadButtonPressed(const ControlPadInput *input, PadButton button)
{
uint8_t buttonNum = input->buttons;
switch (button)
{
case PadButton::Left:
return buttonNum & (uint8_t)PadButton::Left;
break;
case PadButton::Right:
return buttonNum & (uint8_t)PadButton::Right;
break;
case PadButton::Up:
return buttonNum & (uint8_t)PadButton::Up;
break;
case PadButton::Down:
return buttonNum & (uint8_t)PadButton::Down;
break;
case PadButton::Yes:
return buttonNum & (uint8_t)PadButton::Yes;
break;
case PadButton::No:
return buttonNum & (uint8_t)PadButton::No;
break;
case PadButton::Action:
return buttonNum & (uint8_t)PadButton::Action;
break;
default:
return false;
;
}
}
};
#endif // CONTROL_PAD_INPUT_H
-50
View File
@@ -1,50 +0,0 @@
/**
* @file controlPad.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-03-30
*
* @copyright Copyright (c) 2023
*
*/
#pragma once
#include <menuControl.h>
#include "controlPadInput.h"
class ControlPad {
public:
ControlPad();
bool loop();
void insertData(const uint8_t *data);
void setMenuControl(MenuControl* menuControl) { this->menuControl = menuControl; }
const ControlPadInput * getControlPadDataPtr() const { return &this->controlInput; }
bool isControlPadConnected() const { return this->connected; }
private:
MenuControl* menuControl = nullptr;
ControlPadInput controlInput;
bool connected = false;
bool updated = false;
bool firstButtonPress = true;
uint8_t deadZoneX = 20;
uint8_t deadZoneY = 20;
uint8_t lastButtons = 0;
uint16_t disconnectTime = 100;
uint16_t loopDelay = 5;
uint32_t lastMessageReceive = 0;
uint32_t lastLoopMillis = 0;
};
-74
View File
@@ -1,74 +0,0 @@
/**
* @file controlPadInput.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-03-30
*
* @copyright Copyright (c) 2023
*
*/
#ifndef CONTROL_PAD_INPUT_H
#define CONTROL_PAD_INPUT_H
#include <stdint.h>
struct ControlPadInput {
uint8_t buttons;
uint8_t x;
uint8_t y;
uint8_t counter;
};
class ControlPadButton {
public:
enum PadButton {
Left = 4,
Right = 8,
Up = 2,
Down = 1,
Yes = 32,
No = 16,
Action = 64
};
static bool isControlPadButtonPressed(const ControlPadInput *input, PadButton button) {
uint8_t buttonNum = input->buttons;
switch (button) {
case PadButton::Left :
return buttonNum & (uint8_t) PadButton::Left;
break;
case PadButton::Right :
return buttonNum & (uint8_t) PadButton::Right;
break;
case PadButton::Up :
return buttonNum & (uint8_t) PadButton::Up;
break;
case PadButton::Down :
return buttonNum & (uint8_t) PadButton::Down;
break;
case PadButton::Yes :
return buttonNum & (uint8_t) PadButton::Yes;
break;
case PadButton::No :
return buttonNum & (uint8_t) PadButton::No;
break;
case PadButton::Action :
return buttonNum & (uint8_t) PadButton::Action;
break;
default:
return false;;
}
}
};
#endif // CONTROL_PAD_INPUT_H
+23 -16
View File
@@ -1,20 +1,20 @@
#include "counter.h" #include "counter.h"
#include <inttypes.h>
uint8_t Counter::amountOfCounter = 0; uint8_t Counter::amountOfCounter = 0;
Counter::Counter(uint8_t pin) { Counter::Counter(uint8_t pin)
this->pulsePin = pin; : pulsePin{pin}, unit{static_cast<pcnt_unit_t>(Counter::amountOfCounter)}
{
this->unit = static_cast<pcnt_unit_t>(Counter::amountOfCounter); if (Counter::amountOfCounter <= Counter::maxCounter)
if (Counter::amountOfCounter < 7) {
Counter::amountOfCounter++; Counter::amountOfCounter++;
}
pcnt_config_t config; pcnt_config_t config;
config.unit = this->unit; config.unit = this->unit;
config.channel = PCNT_CHANNEL_0; config.channel = PCNT_CHANNEL_0;
config.counter_h_lim = COUNTER_HIGH_LIMIT; config.counter_h_lim = Counter::highLimit;
config.counter_l_lim = COUNTER_LOW_LIMIT; config.counter_l_lim = Counter::lowLimit;
config.ctrl_gpio_num = PCNT_PIN_NOT_USED; config.ctrl_gpio_num = PCNT_PIN_NOT_USED;
config.hctrl_mode = PCNT_CHANNEL_LEVEL_ACTION_KEEP; config.hctrl_mode = PCNT_CHANNEL_LEVEL_ACTION_KEEP;
config.lctrl_mode = PCNT_CHANNEL_LEVEL_ACTION_KEEP; config.lctrl_mode = PCNT_CHANNEL_LEVEL_ACTION_KEEP;
@@ -24,33 +24,40 @@ Counter::Counter(uint8_t pin) {
pcnt_unit_config(&config); pcnt_unit_config(&config);
} }
void Counter::pause() { void Counter::pause()
{
pcnt_counter_pause(this->unit); pcnt_counter_pause(this->unit);
} }
void Counter::resume() { void Counter::resume()
{
pcnt_counter_resume(this->unit); pcnt_counter_resume(this->unit);
} }
void Counter::clear() { void Counter::clear()
{
pcnt_counter_clear(this->unit); pcnt_counter_clear(this->unit);
} }
int16_t Counter::getValue() { int16_t Counter::getValue() const
int16_t res; {
int16_t res = 0;
pcnt_get_counter_value(this->unit, &res); pcnt_get_counter_value(this->unit, &res);
return res; return res;
} }
void Counter::setFilterValue(uint16_t value) { void Counter::setFilterValue(uint16_t value)
{
pcnt_set_filter_value(this->unit, value); pcnt_set_filter_value(this->unit, value);
this->filterEnable(); this->filterEnable();
} }
void Counter::filterEnable() { void Counter::filterEnable()
{
pcnt_filter_enable(this->unit); pcnt_filter_enable(this->unit);
} }
void Counter::filterDisable() { void Counter::filterDisable()
{
pcnt_filter_disable(this->unit); pcnt_filter_disable(this->unit);
} }
+64 -17
View File
@@ -1,30 +1,77 @@
/**
* @file counter.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a class that abstract the hardware counter from the esp32
* @version 0.1
* @date 2023-10-12
*
* @copyright Copyright (c) 2023
*
*/
#pragma once #pragma once
#include <Arduino.h> #include <Arduino.h>
#include <driver/pcnt.h> #include <driver/pcnt.h>
#include <cinttypes>
#define COUNTER_HIGH_LIMIT INT16_MAX /**
#define COUNTER_LOW_LIMIT 0 * @brief A class that abstract the hardware counter from the esp32
*/
class Counter
{
public:
/**
* @brief Construct a new Counter object
*
* @param pin with incoming pulses
*/
Counter(uint8_t pin);
class Counter { /**
public: * @brief Pause the pulse counting
Counter(uint8_t pin); */
void pause();
void pause(); /**
void resume(); * @brief Resume the pulse counting
void clear(); */
void resume();
int16_t getValue(); /**
* @brief Start counting by zero again
*/
void clear();
void setFilterValue(uint16_t value); /**
void filterEnable(); * @brief Get the counted pulses
void filterDisable(); *
* @return int16_t
*/
int16_t getValue() const;
private: /**
static uint8_t amountOfCounter; * @brief Set the filter value
*
* The filter skip all pulses after a pulse for the filter time.
* The filter time depends on the frequency of the processor. The time
* for a whole tact multiplied with the filter value results the filter time.
*
* @param value max 1023
*/
void setFilterValue(uint16_t value);
bool initalised = false; void filterEnable();
void filterDisable();
uint8_t pulsePin; private:
pcnt_unit_t unit; static constexpr int16_t highLimit = INT16_MAX;
static constexpr uint8_t lowLimit = 0;
static constexpr uint8_t maxCounter = 6;
static uint8_t amountOfCounter;
bool initalized = false;
uint8_t pulsePin;
pcnt_unit_t unit;
}; };
+43 -25
View File
@@ -1,5 +1,5 @@
/** /**
* @file displayWrapper.cpp * @file LcdWrapper.cpp
* @author Alexander Klein (alex@kleiax.de) * @author Alexander Klein (alex@kleiax.de)
* @brief Contains the implementation of the class LcdWrapper * @brief Contains the implementation of the class LcdWrapper
* @version 0.1 * @version 0.1
@@ -11,55 +11,73 @@
#include "LcdWrapper.h" #include "LcdWrapper.h"
LcdWrapper::LcdWrapper(LiquidCrystal_I2C* lcd) { LcdWrapper::LcdWrapper(LiquidCrystal_I2C *lcd)
this->lcd = lcd; : lcd{lcd}, changed{false}
this->clear(); {
this->changed = false; // this->clear();
} }
void LcdWrapper::loop() { void LcdWrapper::run()
{
if (!this->changed) if (!this->changed)
{
return; return;
this->lcd->clear();
for (uint8_t i = 0; i < DISPLAY_WRAPPER_LINES; i++) {
this->lcd->setCursor(0, i);
this->lcd->print(this->data[i]);
} }
if (this->callback) this->lcd->clear();
this->callback(this->data, DISPLAY_WRAPPER_LINES, DISPLAY_WRAPPER_ROWS); for (uint8_t i = 0; i < LcdWrapper::totalLines; i++)
{
this->lcd->setCursor(0, i);
this->lcd->print(static_cast<const char *>(this->data[i]));
}
if (static_cast<bool>(this->callback))
{
this->callback(this->data, LcdWrapper::totalLines, LcdWrapper::totalRows);
}
this->changed = false; this->changed = false;
} }
void LcdWrapper::clear() { void LcdWrapper::clear()
for (uint8_t i = 0; i < DISPLAY_WRAPPER_LINES; i++) { {
for (uint8_t j = 0; j < DISPLAY_WRAPPER_ROWS; j++) { for (uint8_t i = 0; i < LcdWrapper::totalLines; i++)
{
for (uint8_t j = 0; j < LcdWrapper::totalRows; j++)
{
data[i][j] = ' '; data[i][j] = ' ';
} }
} }
this->changed = true; this->changed = true;
} }
void LcdWrapper::setCursor(uint8_t row, uint8_t line) { void LcdWrapper::setCursor(uint8_t row, uint8_t line)
if (row > DISPLAY_WRAPPER_ROWS - 1) {
row = DISPLAY_WRAPPER_ROWS - 1; if (row > LcdWrapper::totalRows - 1)
{
row = LcdWrapper::totalRows - 1;
}
if (line > DISPLAY_WRAPPER_LINES - 1) if (line > LcdWrapper::totalLines - 1)
line = DISPLAY_WRAPPER_LINES - 1; {
line = LcdWrapper::totalLines - 1;
}
this->cursorRow = row; this->cursorRow = row;
this->cursorLine = line; this->cursorLine = line;
} }
void LcdWrapper::print(const char *str) { void LcdWrapper::print(const char *str)
{
uint8_t inputStringPosition = 0; uint8_t inputStringPosition = 0;
for (uint8_t i = this->cursorRow; i < DISPLAY_WRAPPER_ROWS; i++) { for (uint8_t i = this->cursorRow; i < LcdWrapper::totalRows; i++)
{
if (str[inputStringPosition] == '\0') if (str[inputStringPosition] == '\0')
{
break; break;
else }
this->data[this->cursorLine][i] = str[inputStringPosition]; this->data[this->cursorLine][i] = str[inputStringPosition];
inputStringPosition++; inputStringPosition++;
} }
this->changed = true; this->changed = true;
+40 -45
View File
@@ -1,5 +1,5 @@
/** /**
* @file displayWrapper.h * @file LcdWrapper.h
* @author Alexander Klein (alex@kleiax.de) * @author Alexander Klein (alex@kleiax.de)
* @brief Contains the LcdWrapper class * @brief Contains the LcdWrapper class
* @version 0.1 * @version 0.1
@@ -15,12 +15,9 @@
#include <iostream> #include <iostream>
#include <LiquidCrystal_I2C.h> #include <LiquidCrystal_I2C.h>
#include <displayWrapper.h> #include <displayWrapper.h>
#include <component.h>
#define DISPLAY_WRAPPER_ROWS 16 typedef void (*LcdWrapperCallback)(const char data[][16], uint8_t lines, uint8_t rows);
#define DISPLAY_WRAPPER_LINES 2
typedef void (*LcdWrapperCallback) (const char data[][DISPLAY_WRAPPER_ROWS], uint8_t lines, uint8_t rows);
/** /**
* @brief A class for the Menu class to print information * @brief A class for the Menu class to print information
* *
@@ -28,53 +25,51 @@ typedef void (*LcdWrapperCallback) (const char data[][DISPLAY_WRAPPER_ROWS], uin
* The class takes the information to print from any thread. The * The class takes the information to print from any thread. The
* loop function has to be called to print the data. * loop function has to be called to print the data.
*/ */
class LcdWrapper : public DisplayWrapper { class LcdWrapper : public DisplayWrapper, public Component
public: {
/** public:
* @brief Construct a new Lcd Wrapper object /**
* * @brief Construct a new Lcd Wrapper object
* @param lcd *
*/ * @param lcd
LcdWrapper(LiquidCrystal_I2C* lcd); */
LcdWrapper(LiquidCrystal_I2C *lcd);
/** /**
* @brief Print the saved data * @brief Empty the buffer
* */
*/ void clear() override;
void loop();
/** /**
* @brief Empty the buffer * @brief Set point where data to be saved
* *
*/ * @param row
void clear() override; * @param line
*/
void setCursor(uint8_t row, uint8_t line) override;
void setCallback(LcdWrapperCallback callback) { this->callback = callback; }
/** /**
* @brief Set point where data to be saved * @brief Save the data to be printed
* *
* @param row * @param str
* @param line */
*/ void print(const char *str) override;
void setCursor(uint8_t row, uint8_t line) override;
void setCallback(LcdWrapperCallback callback) { this->callback = callback; }
/** static constexpr uint8_t totalRows = 16;
* @brief Save the data to be printed static constexpr uint8_t totalLines = 2;
*
* @param str
*/
void print(const char *str) override;
private:
void run() override;
private: LiquidCrystal_I2C *lcd;
LiquidCrystal_I2C* lcd; LcdWrapperCallback callback = nullptr;
LcdWrapperCallback callback = nullptr; char data[LcdWrapper::totalLines][LcdWrapper::totalRows];
char data[DISPLAY_WRAPPER_LINES][DISPLAY_WRAPPER_ROWS];
uint8_t cursorRow = 0; uint8_t cursorRow = 0;
uint8_t cursorLine = 0; uint8_t cursorLine = 0;
bool changed = false; bool changed = false;
}; };
#endif // DISPLAY_WRAPPER_H #endif // DISPLAY_WRAPPER_H
+49 -34
View File
@@ -11,93 +11,109 @@
*/ */
#include "debugMqtt.h" #include "debugMqtt.h"
PubSubClient* DebugMqtt::client; PubSubClient *DebugMqtt::client;
Loglevel DebugMqtt::loglevel; Loglevel DebugMqtt::loglevel;
bool DebugMqtt::isInit = false; bool DebugMqtt::isInit = false;
char DebugMqtt::msg[MQTT_BUFFER_SIZE]; char DebugMqtt::msg[MQTT_BUFFER_SIZE];
char DebugMqtt::topic[MQTT_BUFFER_SIZE]; char DebugMqtt::topic[MQTT_BUFFER_SIZE];
DebugMqtt::DebugMqtt(const char *name, uint8_t bufSize)
DebugMqtt::DebugMqtt(const char* name, uint8_t bufSize) { : name{name}
this->name = name; {
if (bufSize != 0) if (bufSize != 0)
{
this->bufSize = bufSize; this->bufSize = bufSize;
}
this->buf = new char[this->bufSize]; this->buf = new char[this->bufSize];
} }
DebugMqtt::~DebugMqtt() { DebugMqtt::~DebugMqtt()
{
delete this->buf; delete this->buf;
} }
void DebugMqtt::sendMsg(Loglevel loglevel, String topic, String msg) { void DebugMqtt::sendMsg(Loglevel loglevel, String topic, String msg)
snprintf (DebugMqtt::msg, MQTT_BUFFER_SIZE, "%s: %s",this->name ,msg.c_str()); {
this->sendData(loglevel, topic, DebugMqtt::msg); snprintf(static_cast<char *>(DebugMqtt::msg), MQTT_BUFFER_SIZE, static_cast<const char *>("%s: %s"), this->name, msg.c_str());
this->sendData(loglevel, topic, static_cast<const char *>(DebugMqtt::msg));
} }
void DebugMqtt::sendMsg(Loglevel loglevel, String msg) { void DebugMqtt::sendMsg(Loglevel loglevel, String msg)
{
this->sendMsg(loglevel, "", msg); this->sendMsg(loglevel, "", msg);
} }
void DebugMqtt::sendData(Loglevel loglevel, String topic, String data) { void DebugMqtt::sendData(Loglevel loglevel, String topic, String data)
if (!DebugMqtt::isInit) { {
if (!DebugMqtt::isInit)
{
return; return;
} }
if (loglevel <= DebugMqtt::loglevel && loglevel > Loglevel::none) { if (loglevel <= DebugMqtt::loglevel && loglevel > Loglevel::none)
snprintf (DebugMqtt::topic, MQTT_BUFFER_SIZE, "%s%s", DebugMqtt::enum_to_string(loglevel).c_str(), topic.c_str()); {
snprintf (DebugMqtt::msg, MQTT_BUFFER_SIZE, "%s", data.c_str()); snprintf(static_cast<char *>(DebugMqtt::topic), MQTT_BUFFER_SIZE, static_cast<const char *>("%s%s"), DebugMqtt::enum_to_string(loglevel).c_str(), topic.c_str());
client->publish(DebugMqtt::topic, DebugMqtt::msg); snprintf(static_cast<char *>(DebugMqtt::msg), MQTT_BUFFER_SIZE, static_cast<const char *>("%s"), data.c_str());
client->publish(DebugMqtt::topic, static_cast<const char *>(DebugMqtt::msg));
} }
} }
void DebugMqtt::sendData(Loglevel loglevel, String data){ void DebugMqtt::sendData(Loglevel loglevel, String data)
this->sendData(loglevel, "", data); {
DebugMqtt::sendData(loglevel, "", data);
} }
void DebugMqtt::writeToInflux(String measurement_name, String field_set, float measurement, uint64_t nanos) { void DebugMqtt::writeToInflux(String measurement_name, String field_set, float measurement, uint64_t nanos)
{
// Example String: "weather temperature=82 1465839830100400200"; // Example String: "weather temperature=82 1465839830100400200";
snprintf(DebugMqtt::msg, MQTT_BUFFER_SIZE, "%s %s=%f %llu", measurement_name.c_str(), field_set.c_str(), measurement, nanos); snprintf(static_cast<char *>(DebugMqtt::msg), MQTT_BUFFER_SIZE, static_cast<const char *>("%s %s=%f %llu"), measurement_name.c_str(), field_set.c_str(), measurement, nanos);
this->sendData(Loglevel::influx, DebugMqtt::msg); this->sendData(Loglevel::influx, static_cast<const char *>(DebugMqtt::msg));
} }
void DebugMqtt::addCharacter(char c) { void DebugMqtt::addCharacter(char character)
this->buf[this->bufPos] = c; {
this->buf[this->bufPos] = character;
this->bufPos++; this->bufPos++;
if (c == '\n' || this->bufPos >= this->bufSize - 1) { if (character == '\n' || this->bufPos >= this->bufSize - 1)
{
this->buf[this->bufPos - 1] = '\0'; this->buf[this->bufPos - 1] = '\0';
this->sendMsg(Loglevel::info, buf); this->sendMsg(Loglevel::info, buf);
this->bufPos = 0; this->bufPos = 0;
} }
} }
void DebugMqtt::init(PubSubClient *client, Loglevel max_loglevel) { void DebugMqtt::init(PubSubClient *client, Loglevel max_loglevel)
{
DebugMqtt::client = client; DebugMqtt::client = client;
DebugMqtt::loglevel = max_loglevel; DebugMqtt::loglevel = max_loglevel;
DebugMqtt::isInit = true; DebugMqtt::isInit = true;
} }
void DebugMqtt::changeLoglevel(Loglevel loglevel) { void DebugMqtt::changeLoglevel(Loglevel loglevel)
{
DebugMqtt::loglevel = loglevel; DebugMqtt::loglevel = loglevel;
} }
String DebugMqtt::enum_to_string(Loglevel loglevel) { String DebugMqtt::enum_to_string(Loglevel loglevel)
{
String topic = ""; String topic = "";
topic += MQTT_DEBUG_TOPIC; topic += MQTT_DEBUG_TOPIC;
switch(loglevel){ switch (loglevel)
case Loglevel::error : {
case Loglevel::error:
topic += "/Error"; topic += "/Error";
break; break;
case Loglevel::warn : case Loglevel::warn:
topic += "/Warn"; topic += "/Warn";
break; break;
case Loglevel::info : case Loglevel::info:
topic += "/Info"; topic += "/Info";
break; break;
case Loglevel::debug : case Loglevel::debug:
topic += "/Debug"; topic += "/Debug";
break; break;
case Loglevel::influx : case Loglevel::influx:
topic += "/Influx"; topic += "/Influx";
break; break;
default: default:
@@ -105,5 +121,4 @@ String DebugMqtt::enum_to_string(Loglevel loglevel) {
break; break;
} }
return topic; return topic;
} }
+110 -107
View File
@@ -14,7 +14,6 @@
#include <iostream> #include <iostream>
#include <PubSubClient.h> #include <PubSubClient.h>
/** /**
* @brief * @brief
* *
@@ -35,7 +34,7 @@
*/ */
#ifndef MQTT_BUFFER_SIZE #ifndef MQTT_BUFFER_SIZE
#define MQTT_BUFFER_SIZE 128 #define MQTT_BUFFER_SIZE 128
#endif //MQTT_BUFFER_SIZE #endif // MQTT_BUFFER_SIZE
/** /**
* @brief An enum to set the log level * @brief An enum to set the log level
@@ -48,12 +47,15 @@
* @see sendData() * @see sendData()
* *
*/ */
enum Loglevel { none, enum Loglevel
error, {
warn, none,
info, error,
debug, warn,
influx}; info,
debug,
influx
};
/** /**
* @brief A class to send debug messages over MQTT * @brief A class to send debug messages over MQTT
@@ -64,115 +66,116 @@ enum Loglevel { none,
* *
* @see Loglevel * @see Loglevel
*/ */
class DebugMqtt { class DebugMqtt
public: {
/** public:
* @brief Construct a new Debug Mqtt object. /**
* * @brief Construct a new Debug Mqtt object.
* @param name A String with send with every Message. *
* @param bufSize for the addCharacter function. * @param name A String with send with every Message.
*/ * @param bufSize for the addCharacter function.
DebugMqtt(const char* name, uint8_t bufSize = 0); */
DebugMqtt(const char *name, uint8_t bufSize = 0);
~DebugMqtt(); ~DebugMqtt();
/** /**
* @brief Send a Message via MQTT * @brief Send a Message via MQTT
* *
* This function uses sendData to send the given string and * This function uses sendData to send the given string and
* add the name to the message given by the constructer. * add the name to the message given by the constructer.
* *
* @see sendData() * @see sendData()
* @see Loglevel * @see Loglevel
* *
* @param loglevel Loglevel given by the enum Loglevel * @param loglevel Loglevel given by the enum Loglevel
* @param topic Additional topic behind loglevel * @param topic Additional topic behind loglevel
* @param msg The message to send as String * @param msg The message to send as String
*/ */
void sendMsg(Loglevel loglevel, String topic, String msg); void sendMsg(Loglevel loglevel, String topic, String msg);
void sendMsg(Loglevel loglevel, String msg); void sendMsg(Loglevel loglevel, String msg);
/** /**
* @brief Send a Message via MQTT * @brief Send a Message via MQTT
* *
* This function sends the Data via MQTT with the given topic * This function sends the Data via MQTT with the given topic
* from Loglevel or followed by given String topic. * from Loglevel or followed by given String topic.
* Normally this function is called by sendMsg() or by * Normally this function is called by sendMsg() or by
* writeToInflux() * writeToInflux()
* *
* @see sendData() * @see sendData()
* @see writeToInflux() * @see writeToInflux()
* @see Loglevel * @see Loglevel
* *
* @param loglevel Loglevel given by the enum Loglevel * @param loglevel Loglevel given by the enum Loglevel
* @param topic Additional topic behind loglevel * @param topic Additional topic behind loglevel
* @param data The message to send as String * @param data The message to send as String
*/ */
void sendData(Loglevel loglevel, String topic, String data); static void sendData(Loglevel loglevel, String topic, String data);
void sendData(Loglevel loglevel, String data); static void sendData(Loglevel loglevel, String data);
/** /**
* @brief Send a Message via MQTT for InfluxDB * @brief Send a Message via MQTT for InfluxDB
* *
* This function sends a MQTT message which is intended for * This function sends a MQTT message which is intended for
* Telegraf. Telegraf can listen on MQTT messages and put * Telegraf. Telegraf can listen on MQTT messages and put
* them in an Influx Database. * them in an Influx Database.
* *
* @param measurement_name like a category * @param measurement_name like a category
* @param field_set the name of the value e.g temperature * @param field_set the name of the value e.g temperature
* @param measurement the real value * @param measurement the real value
* @param nanos Current time in nanoseconds * @param nanos Current time in nanoseconds
*/ */
void writeToInflux(String measurement_name, String field_set, float measurement, uint64_t nanos); void writeToInflux(String measurement_name, String field_set, float measurement, uint64_t nanos);
/** /**
* @brief Adds a single character to the buf * @brief Adds a single character to the buf
* *
* The buf will be flushed out: * The buf will be flushed out:
* 1. when the buffer is full * 1. when the buffer is full
* 2. when the character is '\n' * 2. when the character is '\n'
* *
* @param c * @param character
*/ */
void addCharacter(char c); void addCharacter(char character);
/** /**
* @brief Initialize debugMQTT for all instances * @brief Initialize debugMQTT for all instances
* *
* You only have to call this function once for your project. * You only have to call this function once for your project.
* If you call this function again you overwrite the client and * If you call this function again you overwrite the client and
* the loglevel. If you only want du overwrite the max_loglevel * the loglevel. If you only want du overwrite the max_loglevel
* use changeLoglevel() * use changeLoglevel()
* *
* @see changeLoglevel() * @see changeLoglevel()
* *
* @param client PubSubClient * @param client PubSubClient
* @param max_loglevel Max loglevel to send. * @param max_loglevel Max loglevel to send.
*/ */
static void init(PubSubClient* client, Loglevel max_loglevel); static void init(PubSubClient *client, Loglevel max_loglevel);
/** /**
* @brief Change loglevel * @brief Change loglevel
* *
* This function changes the maximum loglevel which be send. * This function changes the maximum loglevel which be send.
* *
* @param loglevel * @param loglevel
*/ */
static void changeLoglevel(Loglevel loglevel); static void changeLoglevel(Loglevel loglevel);
private: private:
const char* name; const char *name;
char* buf; char *buf;
uint8_t bufPos = 0; uint8_t bufPos = 0;
uint8_t bufSize = 100; uint8_t bufSize = 100;
static String enum_to_string(Loglevel loglevel); static String enum_to_string(Loglevel loglevel);
static PubSubClient* client; static PubSubClient *client;
static Loglevel loglevel; static Loglevel loglevel;
static bool isInit; static bool isInit;
static char msg[MQTT_BUFFER_SIZE]; static char msg[MQTT_BUFFER_SIZE];
static char topic[MQTT_BUFFER_SIZE]; static char topic[MQTT_BUFFER_SIZE];
}; };
#endif // DEBUG_MQTT_H #endif // DEBUG_MQTT_H
+118 -106
View File
@@ -12,14 +12,15 @@
#include "motorControl.h" #include "motorControl.h"
MotorControl::MotorControl() { MotorControl::MotorControl()
this->setMinPwm(PWMMIN); {
this->setMaxPwm(PWMMAX); Component::loopDelay = MotorControl::loopDelay;
} }
void MotorControl::init(uint8_t pwm_pin, uint8_t pwm_channel, uint8_t dir_1, uint8_t dir_2) { void MotorControl::init(uint8_t pwmPin, uint8_t pwmChannel, uint8_t dir_1, uint8_t dir_2)
this->pwm_pin = pwm_pin; {
this->pwm_channel = pwm_channel; this->pwmPin = pwmPin;
this->pwmChannel = pwmChannel;
this->dir_1 = dir_1; this->dir_1 = dir_1;
this->dir_2 = dir_2; this->dir_2 = dir_2;
@@ -29,169 +30,180 @@ void MotorControl::init(uint8_t pwm_pin, uint8_t pwm_channel, uint8_t dir_1, uin
digitalWrite(this->dir_1, LOW); digitalWrite(this->dir_1, LOW);
digitalWrite(this->dir_2, LOW); digitalWrite(this->dir_2, LOW);
ledcSetup(this->pwm_channel, PWMFREQ, this->pwm_res); ledcSetup(this->pwmChannel, MotorControl::pwmFreq, MotorControl::pwmRes);
ledcAttachPin(this->pwm_pin, this->pwm_channel); ledcAttachPin(this->pwmPin, this->pwmChannel);
ledcWrite(this->pwm_channel, 0); ledcWrite(this->pwmChannel, 0);
} }
uint16_t MotorControl::loop() { void MotorControl::run()
uint32_t time = millis(); {
uint16_t elapsed_time = time - this->lastMillis; // Absolute difference between targetPower and power
const uint8_t abs_difference = abs(this->targetPower - this->power);
//Cancel if delay is not reached // Difference between targetPower and power
if (elapsed_time < delay) const int16_t difference = this->targetPower - this->power;
return elapsed_time;
runMotorControl(); // Check that the target speed is close to 0 and that the abs_difference is lower than MotorControl::powerSteps
this->lastMillis = time; if (abs(this->targetPower) < MotorControl::powerSteps && abs_difference < MotorControl::powerSteps)
return elapsed_time; {
}
void MotorControl::runMotorControl() {
// Absolute difference between target_power and power
uint8_t abs_difference = abs(this->target_power - this->power);
// Difference between target_power and power
int16_t difference = this->target_power - this->power;
// Check that the target speed is close to 0 and that the abs_difference is lower than powersteps
if (abs(this->target_power) < powersteps && abs_difference < powersteps) {
this->setRealPower(0); this->setRealPower(0);
return; return;
} }
// Correct speed // Correct speed
if (abs_difference < powersteps) { if (abs_difference < MotorControl::powerSteps)
{
return; return;
} }
// Positive or negative tagret speed // Positive or negative tagret speed
if (this->target_power >= 0) { if (this->targetPower >= 0)
{
// Positive or negative speed // Positive or negative speed
if (this->power >= 0) { if (this->power >= 0)
if (difference > 0) { {
this->increasePower(powersteps); if (difference > 0)
} else { {
this->increasePower(-powersteps); this->increasePower(MotorControl::powerSteps);
}
else
{
this->increasePower(-MotorControl::powerSteps);
} }
} else {
this->increasePower(powersteps);
} }
else
} else { {
this->increasePower(MotorControl::powerSteps);
}
}
else
{
// Positive or negative speed // Positive or negative speed
if (this->power >= 0) { if (this->power >= 0)
this->increasePower(-powersteps); {
} else { this->increasePower(-MotorControl::powerSteps);
if (difference > 0) { }
this->increasePower(powersteps); else
} else { {
this->increasePower(-powersteps); if (difference > 0)
{
this->increasePower(MotorControl::powerSteps);
}
else
{
this->increasePower(-MotorControl::powerSteps);
} }
} }
} }
} }
void MotorControl::setMinPwm(uint8_t min) { void MotorControl::setMinPwm(uint8_t min)
if (min > 80) min = 80; {
//transform percentage to real pwm value if (min > MotorControl::maxPwmMin)
min = (uint8_t) (((1 << pwm_res) - 1) * (min / 100.0)); {
this->dutycycle_min = min; min = MotorControl::maxPwmMin;
}
// transform percentage to real pwm value
min = static_cast<uint8_t>(((static_cast<uint8_t>(1) << pwmRes) - 1) * (min / 100.0));
this->dutycycleMin = min;
} }
void MotorControl::setMaxPwm(uint8_t max) { void MotorControl::setMaxPwm(uint8_t max)
if (max > 100) max = 100; {
//transform percentage to real pwm value if (max > 100)
max = (uint8_t) (((1 << pwm_res) - 1) * (max / 100.0)); {
this->dutycycle_max = max; max = 100;
}
// transform percentage to real pwm value
max = static_cast<uint8_t>(((static_cast<uint8_t>(1) << pwmRes) - 1) * (max / 100.0));
this->dutycycleMax = max;
} }
uint16_t MotorControl::setPowerSteps(uint8_t increment) { void MotorControl::setTargetPower(int8_t power)
this->powersteps = increment; {
return (uint16_t) (delay * ( 100 / powersteps ));
}
void MotorControl::setTargetPower(int8_t power) {
if (power <= 100 && power >= -100) if (power <= 100 && power >= -100)
this->target_power = power; {
this->targetPower = power;
}
else else
{
std::cout << " MotorControl::setTargetPower: Invalid Argument - Power: " << power << std::endl; std::cout << " MotorControl::setTargetPower: Invalid Argument - Power: " << power << std::endl;
}
} }
uint16_t MotorControl::setDelay(uint8_t delay) { void MotorControl::stop()
this->delay = delay; {
return (uint16_t) (delay * ( 100 / powersteps )); this->targetPower = 0;
} }
void MotorControl::stop() { void MotorControl::emergencyStop()
this->target_power = 0; {
}
void MotorControl::emergencyStop() {
setRealPower(0); setRealPower(0);
} }
int8_t MotorControl::getPower() { bool MotorControl::isTargetPowerReached() const
return this->power; {
return this->targetPower == this->power;
} }
int8_t MotorControl::getTargetPower() { bool MotorControl::isAccelerationPositive() const
return this->target_power; {
return power < targetPower;
} }
bool MotorControl::isTargetPowerReached() { bool MotorControl::isAccelerationNegative() const
if (this->target_power == this->power) {
return true; return power > targetPower;
return false;
} }
bool MotorControl::isAccelerationPositive() { void MotorControl::setRealPower(int8_t power)
if (power < target_power) {
return true; // TODO: Exceptionhandling
return false; if (power <= 100 && power >= -100)
} {
bool MotorControl::isAccelerationNegative() {
if (power > target_power)
return true;
return false;
}
void MotorControl::setRealPower(int8_t power) {
//TODO: Exceptionhandling
if (power <= 100 || power <= -100) {
this->power = power; this->power = power;
} else { }
else
{
return; return;
} }
if (this->power == 0) { if (this->power == 0)
{
this->direction = 0; this->direction = 0;
digitalWrite(this->dir_1, LOW); digitalWrite(this->dir_1, LOW);
digitalWrite(this->dir_2, LOW); digitalWrite(this->dir_2, LOW);
ledcWrite(this->pwm_channel, 0); ledcWrite(this->pwmChannel, 0);
this->dutycycle = 0;
return; return;
} }
uint8_t pwm_val = map(abs(power), 0, 100, this->dutycycle_min, this->dutycycle_max); const uint8_t pwm_val = map(abs(power), 0, 100, this->dutycycleMin, this->dutycycleMax);
if ((this->direction == 1 || this->direction == 0) && power < 0){ // new direction backward if ((this->direction == 1 || this->direction == 0) && power < 0)
{ // new direction backward
this->direction = 2; this->direction = 2;
digitalWrite(this->dir_1, LOW); digitalWrite(this->dir_1, LOW);
digitalWrite(this->dir_2, HIGH); digitalWrite(this->dir_2, HIGH);
} else if ((this->direction == 2 || this->direction == 0) && power > 0){ // new direction forward }
else if ((this->direction == 2 || this->direction == 0) && power > 0)
{ // new direction forward
this->direction = 1; this->direction = 1;
digitalWrite(this->dir_1, HIGH); digitalWrite(this->dir_1, HIGH);
digitalWrite(this->dir_2, LOW); digitalWrite(this->dir_2, LOW);
} }
ledcWrite(this->pwm_channel, pwm_val); ledcWrite(this->pwmChannel, pwm_val);
std::cout << "MotorControl::serRealPower - pwm: " << static_cast<int>(pwm_val) << std::endl;
this->dutycycle = pwm_val;
} }
void MotorControl::increasePower(int8_t power) { void MotorControl::increasePower(int8_t power)
//TODO: Exceptionhandling {
//TODO: make a stop befor a direction change // TODO: Exceptionhandling
if (abs(power) > 2 * powersteps) { // TODO: make a stop befor a direction change
if (abs(power) > 2 * MotorControl::powerSteps)
{
Serial.println("Invalid Argument in MotorControl::increasePower"); Serial.println("Invalid Argument in MotorControl::increasePower");
return; return;
} }
+80 -131
View File
@@ -16,156 +16,105 @@
#include <iostream> #include <iostream>
#include <Arduino.h> #include <Arduino.h>
#define DELAY 10 #include "component.h"
#define PWMFREQ 16000
#define PWMRES 8
#define POWERSTEPS 2 // A total of 20 levels ( 100 / SPEED_STEPS ) * RUN_MOTOR_CONTROL_DELAY = 500ms
#define PWMMIN 55
#define PWMMAX 95 // Max 98% of 2^PWM_RES
/** /**
* @brief A class which use PWM to control the power of DC Motor * @brief A class which use PWM to control the power of DC Motor
* You can control the acceleration of the motor, for example to * You can control the acceleration of the motor, for example to
* prevent a damage on your H-Bridge. * prevent a damage on your H-Bridge.
*/ */
class MotorControl { class MotorControl : public Component
public: {
MotorControl(); public:
MotorControl();
/** /**
* @brief Initialize the motorController * @brief Initialize the motorController
* *
* @param pwm_pin The output pin for the signal on the esp. * @param pwmPin The output pin for the signal on the esp.
* @param pwm_channel One of the pwm channels from the esp. * @param pwmChannel One of the pwm channels from the esp.
* @param dir_1 First direction pin for the H-Bridge. * @param dir_1 First direction pin for the H-Bridge.
* @param dir_2 Second direction pin for the H-Bridge. * @param dir_2 Second direction pin for the H-Bridge.
*/ */
void init(uint8_t pwm_pin, uint8_t pwm_channel, uint8_t dir_1, uint8_t dir_2); void init(uint8_t pwmPin, uint8_t pwmChannel, uint8_t dir_1, uint8_t dir_2);
/** /**
* @brief Calls runMotorControl() to update the pwm signal * @brief Set the minimum duty cycle
* *
* This function should be called every mainloop. If the delay is not reached, than the * @param min duty cycle in percent
* functions returns immediately. */
* @see runMotorControl() void setMinPwm(uint8_t min);
* @see DELAY
* @return time since the last call in Milliseconds
*/
uint16_t loop();
/** /**
* @brief Normally called repeatedly by loop() to update the pwm signal. * @brief Set the maximum duty cycle
* *
* Checks the difference between target power and current power to * @param max duty cycle in percent
* increase or decrease the duty cycle. The amount of decrease or increase */
* is set by setPowerSetps() (default = 2). void setMaxPwm(uint8_t max);
*/
void runMotorControl();
/** /**
* @brief Set the minimum duty cycle * @brief Set the Target Power
* *
* @param min duty cycle in percent * If the given power is greater than 100 or smaller than -100, then
*/ * this function only print an error to consol.
void setMinPwm(uint8_t min); *
* @param power power in percent
*/
void setTargetPower(int8_t power);
/** /**
* @brief Set the maximum duty cycle * @brief Stops the motor like setTargetPower() to 0
* *
* @param max duty cycle in percent */
*/ void stop();
void setMaxPwm(uint8_t max);
/** /**
* @brief Set the Power Steps * @brief Stops the motor immediately
* *
* Set the increment of the steps with which the dutycycle is */
* increased or decreased. Note the dependency between the increment void emergencyStop();
* and delay().
*
* The formula for the time between 0% and 100% power is:
* time[ms] = delay * ( 100 / increment )
* 500 ms are recommended
*
* @see setDelay()
*
* @param increment
* @return time from 0% power to 100% power in Milliseconds
*/
uint16_t setPowerSteps(uint8_t increment);
/** /**
* @brief Set the Target Power * @brief Get the current power
* *
* If the given power is greater than 100 or smaller than -100, then * @return int8_t percent of power (-100 to 100)
* this function only print an error to consol. */
* int8_t getPower() const { return this->power; };
* @param power power in percent
*/
void setTargetPower(int8_t power);
/** /**
* @brief Set the min delay between each loop * @brief Get the target power
* *
* Note the dependency between delay and * @return int8_t percent of power (-100 to 100)
* setPowerSteps(). */
* int8_t getTargetPower() const { return this->targetPower; };
* @see setPowerSteps()
*
* @param delay time in Milliseconds
* @return time from 0% power to 100% power in Milliseconds
*/
uint16_t setDelay(uint8_t delay);
/** uint16_t getDutycycle() const { return this->dutycycle; }
* @brief Stops the motor like setTargetPower() to 0 bool isTargetPowerReached() const;
* bool isAccelerationPositive() const;
*/ bool isAccelerationNegative() const;
void stop();
/** private:
* @brief Stops the motor immediately void run() override;
* void setRealPower(int8_t power);
*/ void increasePower(int8_t power);
void emergencyStop();
/** static constexpr uint8_t loopDelay = 10;
* @brief Get the current power static constexpr uint16_t pwmFreq = 16000;
* static constexpr uint8_t pwmRes = 8;
* @return int8_t percent of power (-100 to 100) static constexpr uint8_t powerSteps = 2; // A total of 20 levels ( 100 / SPEED_STEPS ) * RUN_MOTOR_CONTROL_DELAY = 500ms
*/ static constexpr uint8_t maxPwmMin = 80;
int8_t getPower();
/** int8_t targetPower = 0;
* @brief Get the target power int8_t power = 0;
* uint8_t direction = 0; // 0 = stop, 1 = forward, 2 = backward
* @return int8_t percent of power (-100 to 100)
*/
int8_t getTargetPower();
bool isTargetPowerReached();
bool isAccelerationPositive();
bool isAccelerationNegative();
private:
void setRealPower(int8_t power);
void increasePower(int8_t power);
int8_t target_power = 0;
int8_t power = 0;
uint8_t direction = 0; // 0 = stop, 1 = forward, 2 = backward
uint8_t pwm_pin;
uint8_t pwm_channel;
uint8_t pwm_res = PWMRES;
uint8_t dutycycle_min;
uint8_t dutycycle_max;
uint8_t dir_1;
uint8_t dir_2;
uint8_t delay = DELAY;
uint8_t powersteps = POWERSTEPS;
uint32_t lastMillis = 0;
uint8_t pwmPin = 0;
uint8_t pwmChannel = 0;
uint16_t dutycycle = 0;
uint8_t dutycycleMin = 55;
uint8_t dutycycleMax = 98; // Max 98% of 2^PWM_RES
uint8_t dir_1 = 0;
uint8_t dir_2 = 0;
}; };
#endif // MOTOR_CONTROL_H #endif // MOTOR_CONTROL_H
+112 -198
View File
@@ -11,254 +11,168 @@
#include "navigation.h" #include "navigation.h"
bool Navigation::outputStatusPrintPVTdata = false; Navigation::Navigation(const SensorData *sensorData, Route *route)
bool Navigation::newData = false; : sensorData{sensorData}
uint32_t Navigation::ubxUpdateTimeStatic = 0; {
UBX_NAV_PVT_data_t* Navigation::ubxDataStatic = nullptr;
Navigation::Navigation(Route* route) {
this->gps = new SFE_UBLOX_GNSS();
if (this->gps->begin() == false) {
std::cout << "u-blox GNSS not detected at default I2C address. Please check wiring. Freezing." << std::endl;
while (1);
}
this->init(route); this->init(route);
} }
Navigation::Navigation(SPIClass* spiPort, uint8_t csPin, Route* route) { void Navigation::init(Route *route)
this->gps = new SFE_UBLOX_GNSS(); {
if (this->gps->begin(*spiPort, csPin, 4000000) == false) { if (static_cast<bool>(route))
std::cout << "u-blox GNSS not detected on SPI bus. Please check wiring. Freezing." << std::endl; {
while (1);
}
this->init(route);
}
void Navigation::init(Route* route) {
uint8_t versionHigh = this->gps->getProtocolVersionHigh();
uint8_t versionLow = this->gps->getProtocolVersionLow();
std::cout << "u-blox protocol version: " << unsigned(versionHigh) << "." << unsigned(versionLow) << std::endl;
// std::cout << "Set GNSS Module to factory settings... ";
// this->gps->factoryReset();
// delay(5000);
// std::cout << "Complete" << std::endl;
this->gps->setSPIOutput(COM_TYPE_UBX);
this->gps->enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_SPI, 10);
this->gps->setUSBOutput(COM_TYPE_UBX | COM_TYPE_NMEA);
this->gps->setAutoPVTcallbackPtr(&(Navigation::savePVTdata));
// Navigation::setOutputStatusPrintPVTdata(true);
this->gps->setNavigationFrequency(1);
this->gps->setAutoPVT(true);
if (route)
this->route = route; this->route = route;
}
else else
{
this->route = new Route(); this->route = new Route();
}
this->compass = new QMC5883LCompass(); Component::loopDelay = Navigation::loopDelay;
// Init Compass
Wire.beginTransmission(0x0d);
Wire.write(0x0b);
Wire.write(0x01);
Wire.endTransmission();
this->compass->setMode(0x01,0x0C,0x10,0X00);
this->compass->setCalibration(-1903, 367, -893, 1468, -1110, 310);
} }
Navigation::~Navigation() { Navigation::~Navigation()
delete this->gps; {
delete this->compass;
delete this->ntripClient;
delete this->route; delete this->route;
} }
void Navigation::initNtrip(String host, uint16_t port, String mountPoint, String user, String password) { void Navigation::run() {}
this->ntripClient = new NTRIPClient(this->gps, host.c_str(), port, mountPoint.c_str(), user.c_str(), password.c_str());
this->ntripClient->gpsConfiguration();
this->ntripClient->loop();
this->ntripClient->setActivated(false);
this->isNtripInit = true;
}
void Navigation::loop() { void Navigation::newRoute()
this->gps->checkUblox(); {
this->gps->checkCallbacks(); delete this->route;
if (Navigation::newData) {
this->updateCurrentLocation();
Navigation::newData = false;
}
if (this->ntripClient)
this->ntripClient->loop();
if (millis() - this->lastMillis > AZIMUTH_UPDATE_DELAY) {
this->compass->read();
this->azimuth = this->compass->getAzimuth();
this->lastMillis = millis();
}
}
void Navigation::newRoute() {
if (this->route)
delete this->route;
this->route = new Route(); this->route = new Route();
} }
bool Navigation::startNavigation() { bool Navigation::startNavigation()
Point newTargetPoint = this->route->startRoute(); {
const Point newTargetPoint = this->route->startRoute();
this->navigationStarted = this->setTargetPoint(newTargetPoint); this->navigationStarted = this->setTargetPoint(newTargetPoint);
if (this->navigationStarted) if (this->navigationStarted)
{
this->navigationFinished = false; this->navigationFinished = false;
}
return this->navigationStarted; return this->navigationStarted;
} }
CourseCorrection Navigation::getCourseCorrection() { Navigation::Status Navigation::getCourseCorrection(CourseCorrection &correction, bool forceUpdate)
//TODO: Check accuracy befor make something {
CourseCorrection courseCorrection = {0, 0}; if (this->navigationFinished)
{
int16_t targetCourse = this->currentPosition.courseTo(this->targetPoint); return Status::Complete;
double distance = this->currentPosition.distanceTo(this->targetPoint);
if (distance < 0 || this->navigationFinished)
return courseCorrection;
// Check if I need a new Point
if (distance < MIN_DISTANCE_TO_REACH_POINT) {
bool goOn = this->nextPoint();
if (!goOn) {
this->navigationFinished = true;
this->navigationStarted = false;
return courseCorrection; // End of navigation
}
} }
// correction = targetCourse - currentCourse if (this->currentPosition.getAccuracy() <= this->minAccuracy)
int16_t signedAzimuth = this->azimuth > 180 ? this->azimuth - 360 : this->azimuth; {
int16_t correction = targetCourse - signedAzimuth; return Status::InsufficientAccuracy;
if (correction > 180) }
correction -= 360;
else if (correction < -180)
correction += 360;
courseCorrection.correction = correction; // Check if the Rover has moved, if the Rover hasnt moved this function will be return.
courseCorrection.distance = distance; if (this->currentPosition.distanceTo(this->lastPointCalcCorrection) < (this->minDistanceToReachPoint) / 2 && !forceUpdate)
return courseCorrection; {
correction.correction = this->calculateCourseCorrection(this->lastPointCalcCorrection);
correction.distance = this->lastPointCalcCorrection.distanceTo(this->targetPoint);
return Status::Unchanged;
}
double distance = this->currentPosition.distanceTo(this->targetPoint);
// Check if I need a new Point
if (distance < this->minDistanceToReachPoint && this->preventNextPoint == false)
{
if (!this->nextPoint())
{
this->navigationFinished = true;
this->navigationStarted = false;
return Status::Complete; // End of navigation
}
distance = this->currentPosition.distanceTo(this->targetPoint);
}
correction.correction = this->calculateCourseCorrection(this->currentPosition);
correction.distance = distance;
this->lastPointCalcCorrection = this->currentPosition;
return Status::Updated;
} }
bool Navigation::addCurrentPosToRoute() { Navigation::Status Navigation::addCurrentPosToRoute()
if (!this->currentPosition.isValid()) { return false; } {
if (this->currentPosition.getAccuracy() <= this->minAccuracy)
{
return Status::InsufficientAccuracy;
}
// First Point // First Point
if (this->route->getRouteInfo().totalPoints == 0) { if (this->route->getRouteInfo().totalPoints == 0)
{
this->route->addPointToRoute(this->currentPosition); this->route->addPointToRoute(this->currentPosition);
this->lastPoint = this->currentPosition; this->lastPointRouteInsert = this->currentPosition;
return true; return Status::Updated;
} }
// Every Point after the first // Every Point after the first
if (MIN_DISTANCE_BETWEEN_POINTS <= this->currentPosition.distanceTo(this->lastPoint)) { const double distance = this->currentPosition.distanceTo(this->lastPointRouteInsert);
if (Navigation::minDisBetweenPoints <= distance && Navigation::maxDisBetweenPoints >= distance)
{
this->route->addPointToRoute(this->currentPosition); this->route->addPointToRoute(this->currentPosition);
this->lastPoint = this->currentPosition; this->lastPointRouteInsert = this->currentPosition;
return true; return Status::Updated;
} }
return false; return Status::Unchanged;
} }
// bool Navigation::setPointBeforeTurn() { int16_t Navigation::calculateCourseCorrection(Point &point)
// if (millis() - this->currentPosition.getCreationTime() > 1000) {
// return false; const int16_t targetCourse = point.courseTo(this->targetPoint);
// this->beforeTurnPoint = this->currentPosition; int16_t correctionCourse = 0;
// return true;
// }
void Navigation::updateCurrentLocation() { if (this->sensorData->getCalcAzimuthState() == CalcAzimuth::State::Good || this->sensorData->getCalcAzimuthState() == CalcAzimuth::State::Super)
if (Navigation::ubxUpdateTimeStatic == this->ubxUpdateTime) {
return; correctionCourse = targetCourse - this->sensorData->getCalcAzimuth();
this->lastUsedCalcAzimuth = true;
}
else
{
correctionCourse = targetCourse - this->sensorData->getRealAzimuth();
this->lastUsedCalcAzimuth = false;
}
this->ubxData = Navigation::ubxDataStatic; return Navigation::fixDegree(correctionCourse);
this->ubxUpdateTime = Navigation::ubxUpdateTimeStatic;
Point::Coordinates coords;
coords.lat = this->ubxData->lat / 10000000.0;
coords.lon = this->ubxData->lon / 10000000.0;
this->currentPosition = Point(coords, this->ubxData->hAcc);
} }
bool Navigation::nextPoint() { bool Navigation::nextPoint()
{
if (!this->navigationStarted) if (!this->navigationStarted)
{
return false; return false;
}
return this->setTargetPoint(this->route->getNextPoint()); return this->setTargetPoint(this->route->getNextPoint());
} }
bool Navigation::setTargetPoint(Point target) { bool Navigation::setTargetPoint(Point target)
if (target.isValid()) { {
if (target.isInit())
{
this->targetPoint = target; this->targetPoint = target;
return true; return true;
} }
return false; return false;
} }
void Navigation::setOutputStatusPrintPVTdata(bool status) { int16_t Navigation::fixDegree(int16_t degree)
Navigation::outputStatusPrintPVTdata = status; {
static constexpr uint16_t fullCircle = 360;
while (degree < -fullCircle / 2 || degree > fullCircle / 2)
{
if (degree > fullCircle / 2)
{
degree -= fullCircle;
}
else if (degree < -fullCircle / 2)
{
degree += fullCircle;
}
}
return degree;
} }
void Navigation::printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct) {
if (!Navigation::outputStatusPrintPVTdata)
return;
double latitude = (double) ubxDataStruct->lat / 10000000.0;
double longitude = (double) ubxDataStruct->lon / 10000000.0;
double altitude = (double) ubxDataStruct->hMSL / 1000.0;
uint8_t fixType = ubxDataStruct->fixType;
char fixTypeString[32];
if (fixType == 0)
strcpy(fixTypeString, "None");
else if (fixType == 1)
strcpy(fixTypeString, "Dead Reckoning");
else if (fixType == 2)
strcpy(fixTypeString, "2D");
else if (fixType == 3)
strcpy(fixTypeString, "3D");
else if (fixType == 3)
strcpy(fixTypeString, "GNSS + Dead Reckoning");
else if (fixType == 5)
strcpy(fixTypeString, "Time Only");
else
strcpy(fixTypeString, "UNKNOWN");
uint8_t carrSoln = ubxDataStruct->flags.bits.carrSoln;
char carrSolnString[16];
if (carrSoln == 0)
strcpy(carrSolnString, "None");
else if (carrSoln == 1)
strcpy(carrSolnString, "Floating");
else if (carrSoln == 2)
strcpy(carrSolnString, "Fixed");
else
strcpy(carrSolnString, "UNKNOWN");
uint32_t hAcc = ubxDataStruct->hAcc;
std::cout << "Lat: " << latitude
<< " Lng: " << longitude
<< " Alt: " << altitude << std::endl;
std::cout << "Fix: " << fixTypeString
<< " Carrier Solution: " << carrSolnString
<< " Horizontal Accuracy Estimate: " << hAcc << " mm" << std::endl;
}
void Navigation::savePVTdata(UBX_NAV_PVT_data_t *ubxDataStruct) {
Navigation::printPVTdata(ubxDataStruct);
Navigation::newData = true;
Navigation::ubxDataStatic = ubxDataStruct;
Navigation::ubxUpdateTimeStatic = millis();
}
+106 -184
View File
@@ -12,25 +12,12 @@
#ifndef NAVIGATION_H #ifndef NAVIGATION_H
#define NAVIGATION_H #define NAVIGATION_H
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
#include <QMC5883LCompass.h>
#include <Arduino.h> #include <Arduino.h>
#include <iostream> #include <iostream>
#include <SPI.h>
#include "route.h" #include "route.h"
#include "NTRIPClient.h" #include "sensorData.h"
#include "component.h"
/**
* @brief The minimal distance between Points
*
* This is a very critical option. It have to be
* around the half accuracy of the positioning system
*
*/
#define MIN_DISTANCE_BETWEEN_POINTS 0.1
#define MIN_DISTANCE_TO_REACH_POINT 3 // TODO: Only for testing!
#define AZIMUTH_UPDATE_DELAY 20
/** /**
* @brief This struct inherits the result of the navigation * @brief This struct inherits the result of the navigation
@@ -39,7 +26,8 @@
* correct the direction in dependency on this. * correct the direction in dependency on this.
* *
*/ */
struct CourseCorrection { struct CourseCorrection
{
int16_t correction; int16_t correction;
double distance; double distance;
}; };
@@ -47,195 +35,129 @@ struct CourseCorrection {
/** /**
* @brief This class navigate an object * @brief This class navigate an object
* *
* The class use the given Route and the gps device * The class use the given Route and the gnss device
* to tell the driver in which direction he have to * to tell the driver in which direction he have to
* be drive and the distance to the next checkpoint. * be drive and the distance to the next checkpoint.
* *
*/ */
class Navigation { class Navigation : public Component
public: {
/** public:
* @brief Construct a new Navigation object and using I2C enum Status
* {
* @param route with which to navigate InsufficientAccuracy,
*/ Unchanged,
Navigation(Route* route = nullptr); Updated,
Complete
};
/** /**
* @brief Construct a new Navigation object and using SPI * @brief Construct a new Navigation object
* *
* @param route with which to navigate * @param sensorData
*/ * @param route
Navigation(SPIClass* spiPort, uint8_t csPin, Route* route = nullptr); */
Navigation(const SensorData *sensorData, Route *route = nullptr);
/** /**
* @brief Destroy the Navigation object * @brief Destroy the Navigation object
* *
*/ */
~Navigation(); ~Navigation();
/** /**
* @brief * @brief creates a new empty route
* *
* @param host */
* @param port void newRoute();
* @param mountPoint
* @param user
* @param password
*/
void initNtrip(String host, uint16_t port, String mountPoint, String user, String password);
/** /**
* @brief Decodes new GPS information * @brief Tries to start the route
* *
* Should be called ever main loop. * For example the route can not be started
*/ * if there are no Points or wrong Points.
void loop(); *
* @return true route is started
* @return false route can not be started
*/
bool startNavigation();
void freezeTargetPoint(bool val = true) { this->preventNextPoint = val; };
/** double increaseMinDistanceToReachPoint() { return this->minDistanceToReachPoint += 0.1; }
* @brief creates a new empty route double decreaseMinDistanceToReachPoint() { return this->minDistanceToReachPoint -= 0.1; }
*
*/
void newRoute();
/** // TODO: Dokumentation korrigieren.
* @brief Tries to start the route /**
* * @brief Get the Course Correction object
* For example the route can not be started *
* if there are no Points or wrong Points. * @param correction
* * @param forceUpdate
* @return true route is started * @return Status
* @return false route can not be started */
*/ Status getCourseCorrection(CourseCorrection &correction, bool forceUpdate = false);
bool startNavigation();
/** // TODO: Dokumentation korrigieren.
* @brief Get the Course Correction object /**
* * @brief Tries to add the current Position to the route
* This should be called by the driver to get new instructions. *
* * This can be go wrong if there is no valid GPS signal
* @return CourseCorrection *
*/ * @return true successful added point
CourseCorrection getCourseCorrection(); * @return false no point added to route
*/
Status addCurrentPosToRoute();
/** /**
* @brief Tries to add the current Position to the route * @brief Get the Route Info object
* *
* This can be go wrong if there is no valid GPS signal * This object contains information about the route.
* * For example the stored points.
* @return true successful added point *
* @return false no point added to route * @return RouteInfo
*/ */
bool addCurrentPosToRoute(); RouteInfo getRouteInfo() const { return this->route->getRouteInfo(); }
Route *getRoute() const { return this->route; }
Point getCurrentPosition() const { return this->currentPosition; }
// TODO: can be deleted? Point::Accuracy getMinAccuracy() const { return this->minAccuracy; }
// bool setPointBeforeTurn(); void setMinAccuracy(Point::Accuracy accuracy) { this->minAccuracy = accuracy; }
/** // map input in range from -180 to 180 degree
* @brief Get the Ubx Data object static int16_t fixDegree(int16_t degree);
*
* This struct includes the most Data from the GNSS-Module.
*
* @return UBX_NAV_PVT_data_t*
*/
UBX_NAV_PVT_data_t* getUbxData() { return this->ubxData; }
/** private:
* @brief Returns the NTRIPClient object void run() override;
* void init(Route *route);
* @return NTRIPClient* bool nextPoint();
*/ bool setTargetPoint(Point target);
NTRIPClient* getNTRIPClient() { return this->ntripClient; } int16_t calculateCourseCorrection(Point &point);
/** static constexpr uint8_t loopDelay = 20;
* @brief Get the Route Info object static constexpr uint8_t maxDisBetweenPoints = 10;
* static constexpr float minDisBetweenPoints = 0.3;
* This object contains information about the route.
* For example the stored points.
*
* @return RouteInfo
*/
RouteInfo getRouteInfo() const { return this->route->getRouteInfo(); }
Route* getRoute() const { return this->route; }
/** const SensorData *sensorData;
* @brief Get azimuth Route *route = nullptr;
*
* This value represents the angle between north and
* the line of sight. Clockwise.
*
* @return uint16_t degree
*/
uint16_t getAzimuth() const { return this->azimuth; }
/** Point lastPointRouteInsert;
* @brief Set the output status for PVTdata. Point lastPointCalcCorrection;
* Point lastPointDrivingDirectionChange;
* If this is true, a lot of information from the gnss module will be printed in Point targetPoint;
* the interval of navigation frequency. Point currentPosition;
* Point::Accuracy minAccuracy = Point::Accuracy::twoDigOfCM;
* @param status
*/
static void setOutputStatusPrintPVTdata(bool status);
private: bool navigationStarted = false;
void updateCurrentLocation(); bool navigationFinished = false;
bool isNtripInit = false;
bool preventNextPoint = false;
bool directionChangeMode = false;
bool lastUsedCalcAzimuth = false;
/** uint8_t timeToWait = 200;
* @brief Set the next point as target uint32_t lastMillis = 0;
* uint32_t ubxUpdateTime = 0;
* @return true
* @return false
*/
bool nextPoint();
/** double minDistanceToReachPoint = 0.5;
* @brief Set the target point
*
* @param target
* @return true
* @return false
*/
bool setTargetPoint(Point target);
void init(Route* route);
SFE_UBLOX_GNSS* gps;
UBX_NAV_PVT_data_t* ubxData = nullptr;
Route* route = nullptr;
NTRIPClient* ntripClient = nullptr;
QMC5883LCompass* compass;
Point lastPoint;
Point targetPoint;
Point currentPosition;
Point beforeTurnPoint;
bool navigationStarted = false;
bool navigationFinished = false;
bool isNtripInit = false;
char* host;
char* mountPoint;
char* user;
char* password;
uint8_t timeToWait = 200;
uint16_t port;
uint16_t azimuth = UINT16_MAX;
uint32_t lastMillis = 0;
uint32_t ubxUpdateTime = 0;
static void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct);
static void savePVTdata(UBX_NAV_PVT_data_t *ubxDataStruct);
static UBX_NAV_PVT_data_t* ubxDataStatic;
static uint32_t ubxUpdateTimeStatic;
static bool outputStatusPrintPVTdata;
static bool newData;
}; };
#endif // NAVIGATION_H #endif // NAVIGATION_H
-178
View File
@@ -1,178 +0,0 @@
/**
* @file route.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief Implements the class Route and Point
* @version 0.1
* @date 2022-01-31
*
* @copyright Copyright (c) 2022
*
*/
#include "route.h"
Point::Point(double lat, double lon, uint32_t horizontalAccuracy) {
this->coordinates.lat = lat;
this->coordinates.lon = lon;
this->init(horizontalAccuracy);
}
Point::Point(int32_t lat, int32_t lon, uint32_t horizontalAccuracy) {
this->coordinates.lat = lat / 10000000.0;
this->coordinates.lon = lon / 10000000.0;
this->init(horizontalAccuracy);
}
Point::Point(Coordinates coords, uint32_t horizontalAccuracy) {
this->coordinates = coords;
this->init(horizontalAccuracy);
}
Point::Point(Coordinates coords, bool imported) {
this->coordinates = coords;
if (imported)
this->init(UINT32_MAX);
else
this->init(0);
}
Point::Point() {
this->coordinates.lat = 0;
this->coordinates.lon = 0;
this->init(0);
}
bool Point::operator==(const Point& rhs) const {
return this->coordinates == rhs.getCoordinates();
}
// distance = sqrt(dx * dx + dy * dy)
// mit distance: Entfernung in km
// dx = 111.3 * cos(lat) * (lon1 - lon2)
// lat = (lat1 + lat2) / 2 * 0.01745
// dy = 111.3 * (lat1 - lat2)
// lat1, lat2, lon1, lon2: Breite, Länge in Grad
double Point::distanceTo(const Coordinates& point) const {
Coordinates begin = this->coordinates;
Coordinates end = point;
double lat = (begin.lat + end.lat) / 2 * ROUTE_DEGREE_TO_RADIANT;
double dy = ROUTE_DISTANCE_BETWEEN_LATITUDE * (begin.lat - end.lat);
double dx = ROUTE_DISTANCE_BETWEEN_LATITUDE * cos(lat) * (begin.lon - end.lon);
return sqrt(dx * dx + dy * dy);
}
double Point::distanceTo(const Point &point) const {
return this->distanceTo(point.getCoordinates());
}
int16_t Point::courseTo(const Coordinates& point) const {
Coordinates begin = this->coordinates;
Coordinates end = point;
double phi = log( tan(end.lat * ROUTE_DEGREE_TO_RADIANT / 2 + ROUTE_PI / 4) / tan(begin.lat * ROUTE_DEGREE_TO_RADIANT / 2 + ROUTE_PI / 4) );
double lon = (begin.lon * ROUTE_DEGREE_TO_RADIANT - end.lon * ROUTE_DEGREE_TO_RADIANT);
int16_t res = (int16_t) atan2(lon, phi) / ROUTE_DEGREE_TO_RADIANT;
// if (res < 0)
// res += 360;
return res;
}
int16_t Point::courseTo(const Point &point) const {
return this->courseTo(point.getCoordinates());
}
void Point::init(uint32_t horizontalAccuracy) {
this->creationTime = millis();
if (horizontalAccuracy == UINT32_MAX)
this->accuracy = PointAccuracy::imported;
else if (horizontalAccuracy > 9999)
this->accuracy = PointAccuracy::fourDigOfCM;
else if (horizontalAccuracy > 999)
this->accuracy = PointAccuracy::threeDigOfCM;
else if (horizontalAccuracy > 99)
this->accuracy = PointAccuracy::twoDigOfCM;
else
this->accuracy = PointAccuracy::oneDigOfCM;
}
Route::Route() {
}
void Route::addPointToRoute(Point point) {
this->points.push_back(point);
}
void Route::clear() {
this->points.clear();
this->currentPoint = 0;
this->started = false;
}
Point Route::startRoute() {
if (this->points.size() < 1) {
this->started = false;
return Point();
}
this->it = this->points.begin();
this->currentPoint = 1;
this->started = true;
return *this->it;
}
Point Route::endRoute() {
if (this->points.size() < 1) {
this->started = false;
return Point();
}
this->it = this->points.end();
// TODO: Understand why i have to decrement the iterator first to get realy the last element.
this->it--;
this->currentPoint = this->points.size();
this->started = true;
return *this->it;
}
Point Route::getNextPoint() {
if (!this->started)
return Point();
if (this->it != this->points.end()) {
this->it++;
this->currentPoint++;
return *this->it;
// } else if (this->it == this->points.end() && this->currentPoint != this->points.size()) {
// this->currentPoint++;
// return *this->it;
} else
return Point();
}
Point Route::getPreviousPoint() {
if (!this->started)
return Point();
if (this->it != this->points.begin()) {
this->it--;
this->currentPoint--;
return *this->it;
} else {
return Point();
}
}
RouteInfo Route::getRouteInfo() {
RouteInfo info;
info.totalPoints = this->points.size();
info.currentPoint = this->currentPoint;
return info;
}
-240
View File
@@ -1,240 +0,0 @@
/**
* @file route.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains the class Point and Route
* @version 0.1
* @date 2022-01-31
*
* @copyright Copyright (c) 2022
*
*/
#ifndef ROUTE_H
#define ROUTE_H
#include <Arduino.h>
#include <cstdint>
#include <list>
#include <cmath>
#define ROUTE_DEGREE_TO_RADIANT 0.01745
#define ROUTE_DISTANCE_BETWEEN_LATITUDE 111300
#define ROUTE_PI 3.14159265358979323846
/**
* @brief A to handle points on the earth
*
* The points inherits latidue and longitude as doubles
*
*/
class Point{
public:
/**
* @brief Hold the data longitude and latitude
*
*/
struct Coordinates {
double lon;
double lat;
bool operator==(const Coordinates rhs) const {
return ( this->lon == rhs.lon ) && ( this->lon == rhs.lon );
}
};
/**
* @brief The Accuracy is set by the constructor
*
*/
enum PointAccuracy {
none,
fourDigOfCM,
threeDigOfCM,
twoDigOfCM,
oneDigOfCM,
imported
};
/**
* @brief Construct a new Point object
*
* @param lat latitude
* @param lon longitude
* @param horizontalAccuracy mm
* @param coords Coordinates
* @param imported if true than highest accuracy
*/
Point(double lat, double lon, uint32_t horizontalAccuracy = 0);
Point(int32_t lat, int32_t lon, uint32_t horizontalAccuracy = 0);
Point(Coordinates coords, uint32_t horizontalAccuracy = 0);
Point(Coordinates coords, bool imported);
Point();
/**
* @brief Checks if to points are equal.
*
* @param rhs
* @return true
* @return false
*/
bool operator==(const Point& rhs) const;
/**
* @brief Checks if the point is initalized.
*
* @return true
* @return false
*/
bool isInit() const { return this->coordinates.lat + this->coordinates.lon; }
/**
* @brief Checks if the point is valid.
*
* If the accuracy is higher than zero, true will be returned.
*
* @return true
* @return false
*/
bool isValid() const { return (this->accuracy > 0) ? true : false; }
/**
* @brief Calculates the distance between to points.
*
* @param point
* @return double meter
*/
double distanceTo(const Coordinates& point) const;
double distanceTo(const Point& point) const;
/**
* @brief Calculates the course to an other point.
*
* @param point
* @return int16_t degree
*/
int16_t courseTo(const Coordinates& point) const;
int16_t courseTo(const Point& point) const;
uint32_t getCreationTime() const { return this->creationTime; }
double getLongitude() const { return this->coordinates.lon; }
double getLatitude() const { return this->coordinates.lat; }
Coordinates getCoordinates() const { return this->coordinates; }
/**
* @brief Get the Accuracy object
*
* The higher the value, the greater the accuracy.
* You can check it by PointAccuracy.
*
* @return PointAccuracy
*/
PointAccuracy getAccuracy() { return this->accuracy; }
private:
void init(uint32_t horizontalAccuracy);
PointAccuracy accuracy = PointAccuracy::none;
Coordinates coordinates;
uint32_t creationTime = 0;
};
/**
* @brief Holds some route information
*
*/
struct RouteInfo{
/**
* @brief Selected number of Points
*/
uint16_t currentPoint;
/**
* @brief Total points stored in route
*/
uint16_t totalPoints;
};
/**
* @brief A class to manage multiple points
*
* The list of point presents a route which can be driven
*/
class Route {
public:
/**
* @brief Construct a new Route object.
*/
Route();
/**
* @brief Adds a point to the list.
*
* @param point
*/
void addPointToRoute(Point point);
/**
* @brief Delete all points.
*
*/
void clear();
/**
* @brief Select the first point as target.
*
* @return Point
*/
Point startRoute();
/**
* @brief Select the last point as target.
*
* @return Point
*/
Point endRoute();
/**
* @brief Get the next point and set it as target.
*
* @return Point is zero if there are no more Points.
*/
Point getNextPoint();
/**
* @brief Get the previous point and set it as target.
*
* @return Point
*/
Point getPreviousPoint();
/**
* @brief Get the Route Info object
*
* @return RouteInfo
*/
RouteInfo getRouteInfo();
/**
* @brief Get the Started object
*
* The Route will be marked as started when startRoute or
* endRoute has been called.
*
* @return true
* @return false
*/
bool getStarted() const { return this->started; }
private:
uint16_t currentPoint = 0;
bool started = false;
std::list<Point> points;
std::list<Point>::iterator it;
};
#endif // ROUTE_H
+201
View File
@@ -0,0 +1,201 @@
/**
* @file network.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-18
*
* @copyright Copyright (c) 2023
*
*/
#include "network.h"
Network::Network(const char *ssid, const char *passphrase)
{
if (!WiFiGenericClass::mode(WIFI_AP_STA))
{
std::cout << "Network::connectWiFi failed WiFi.mode" << std::endl;
}
this->init(ssid, passphrase);
}
Network::Network(const char *ssid, const char *passphrase, NetworkAddresses adresses)
: addresses{adresses}
{
if (!WiFiGenericClass::mode(WIFI_AP_STA))
{
std::cout << "Network::connectWiFi failed WiFi.mode" << std::endl;
}
if (!WiFi.config(this->addresses.localIP,
this->addresses.gateway,
this->addresses.subnet,
this->addresses.dnsServer))
{
std::cout << "STA Failed to configure" << std::endl;
}
this->init(ssid, passphrase);
}
Network::~Network()
{
delete mqttClient;
}
bool Network::activateEspNow(receiveCallbackPtr reci, sendCallbackPtr send)
{
if (esp_now_init() != ESP_OK)
{
std::cout << "Network::activateEspNow - Error initializing ESP-NOW" << std::endl;
return false;
}
esp_now_register_send_cb(send);
esp_now_peer_info_t peerInfo = {};
memcpy(static_cast<void *>(peerInfo.peer_addr), static_cast<const void *>(this->broadcastAddress), 6);
peerInfo.channel = 0;
peerInfo.encrypt = false;
if (esp_now_add_peer(&peerInfo) != ESP_OK)
{
std::cout << "Network::connectEspNow - Failed to add peer" << std::endl;
return false;
}
esp_now_register_recv_cb(reci);
return true;
}
bool Network::activateMqtt(const char *user, const char *passphrase)
{
this->mqttUser = user;
this->mqttPassphrase = passphrase;
this->mqttClient = new PubSubClient(this->wifiClient);
this->mqttClient->setServer(this->addresses.mqttServer, this->addresses.mqttPort);
this->mqttClient->setSocketTimeout(1);
if (this->wifiConnected)
{
return this->connectMqtt();
}
return false;
}
const void Network::printIPs()
{
std::cout << std::endl;
if (!this->wifiConnected)
{
std::cout << "WiFi is not connected." << std::endl;
return;
}
std::cout << "WiFi is connected to" << std::endl;
std::cout << "IP address: " << std::endl;
std::cout << WiFi.localIP().toString().c_str() << std::endl;
std::cout << "WiFi MAC Address: " << WiFi.macAddress().c_str() << std::endl
<< std::endl;
}
uint8_t Network::getCurrentChannel()
{
uint8_t channel = 0;
wifi_second_chan_t secondChannel = WIFI_SECOND_CHAN_NONE;
if (esp_wifi_get_channel(&channel, &secondChannel) != ESP_OK)
{
std::cout << "Network::getCurrentChannel - Error!" << std::endl;
return -1;
}
return channel;
}
void Network::runAsChild()
{
if (!this->initSuccessful)
{
return;
}
this->checkWifi();
if (this->wifiConnected && static_cast<bool>(this->mqttClient))
{
this->checkMqtt();
}
}
void Network::init(const char *ssid, const char *passphrase)
{
// Connect to Wi-Fi network with SSID and password
std::cout << "Connecting to " << ssid << std::endl;
WiFi.begin(ssid, passphrase);
uint8_t timeout = Network::wifiConnectTimeout;
while (WiFiSTAClass::status() != WL_CONNECTED)
{
delay(Network::wifiConnectLoopTime);
std::cout << "." << std::flush;
timeout--;
if (timeout == 0)
{
std::cout << std::endl;
std::cout << "WiFi NOT connected." << std::endl;
return;
}
}
this->wifiConnected = true;
this->printIPs();
}
void Network::checkWifi()
{
if ((WiFiSTAClass::status() != WL_CONNECTED) && (millis() - this->lastWifiReconnectAttempt >= Network::wifiReconnectDelay))
{
std::cout << "Reconnecting to WiFi..." << std::endl;
WiFi.disconnect();
this->wifiConnected = WiFi.reconnect();
this->lastWifiReconnectAttempt = millis();
}
}
void Network::checkMqtt()
{
if (!this->mqttClient->connected() && millis() - this->lastMqttReconnectAttempt > Network::mqttReconnectDelay)
{
this->mqttConnected = this->connectMqtt();
this->lastMqttReconnectAttempt = millis();
}
if (this->mqttConnected)
{
this->mqttClient->loop();
}
}
bool Network::connectMqtt()
{
String clientId = "ESP32Rover-";
clientId += String(random(), HEX);
if (static_cast<bool>(this->mqttUser))
{
if (this->mqttClient->connect(clientId.c_str(), this->mqttUser, this->mqttPassphrase))
{
this->mqttClient->publish("Rover/Info", "Connected to Mqtt-Broker");
}
}
else
{
if (this->mqttClient->connect(clientId.c_str()))
{
this->mqttClient->publish("Rover/Info", "Connected to Mqtt-Broker");
}
}
return this->mqttClient->connected();
}
+136
View File
@@ -0,0 +1,136 @@
/**
* @file network.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-18
*
* @copyright Copyright (c) 2023
*
*/
#ifndef NETWORK_H
#define NETWORK_H
#include "component.h"
#include <iostream>
#include <WiFi.h>
#include <PubSubClient.h>
#include <esp_now.h>
#include <esp_wifi.h>
/**
* @brief Typedef to easy handle the receive Callback
*/
typedef void (*receiveCallbackPtr)(const uint8_t *mac, const uint8_t *incomingData, int len);
/**
* @brief Typedef to easy handle the send Callback
*/
typedef void (*sendCallbackPtr)(const uint8_t *mac_addr, esp_now_send_status_t status);
/**
* @brief A Struct to hold all network addresses
*/
struct NetworkAddresses
{
IPAddress localIP;
IPAddress gateway;
IPAddress subnet;
IPAddress dnsServer;
IPAddress mqttServer;
uint16_t mqttPort = 1883;
};
/**
* @brief A class to manage the wireless connections
*/
class Network : public Component
{
public:
/**
* @brief Construct a new Network object
*
* With this constructor the esp gets its ip from a Dhcp server
*
* @param ssid
* @param passphrase
*/
Network(const char *ssid, const char *passphrase);
/**
* @brief Construct a new Network object
*
* This constructor is used for a static ip setup
*
* @param ssid
* @param passphrase
* @param addresses
*/
Network(const char *ssid, const char *passphrase, NetworkAddresses addresses);
~Network();
/**
* @brief Activate ESP-NOW to communicate with the remote Control
*
* @param receive
* @param send
* @return true
* @return false
*/
bool activateEspNow(receiveCallbackPtr receive, sendCallbackPtr send);
/**
* @brief Activate MQTT to send debug messages
*
* @param user
* @param passphrase
* @return true
* @return false
*/
bool activateMqtt(const char *user = nullptr, const char *passphrase = nullptr);
/**
* @brief Print the current used IPs
*/
const void printIPs();
bool isWifiConnected() const { return this->wifiConnected; }
bool isMqttConnected() const { return this->mqttConnected; }
const uint8_t *getBroadcastAddress() const { return this->broadcastAddress; }
PubSubClient *getMqttClient() const { return this->mqttClient; }
static uint8_t getCurrentChannel();
private:
void run() override{};
void runAsChild() override;
void init(const char *ssid, const char *passphrase);
void checkWifi();
void checkMqtt();
bool connectMqtt();
NetworkAddresses addresses;
WiFiClient wifiClient;
PubSubClient *mqttClient = nullptr;
bool initSuccessful = false;
bool wifiConnected = false;
bool mqttConnected = false;
const char *mqttUser = nullptr;
const char *mqttPassphrase = nullptr;
uint8_t broadcastAddress[6] = {0xC8, 0xC9, 0xA3, 0xC8, 0x57, 0x10};
uint32_t lastWifiReconnectAttempt = 0;
uint32_t lastMqttReconnectAttempt = 0;
static constexpr uint8_t wifiConnectTimeout = 20;
static constexpr uint16_t wifiConnectLoopTime = 500;
static constexpr uint16_t wifiReconnectDelay = 5000;
static constexpr uint16_t mqttReconnectDelay = 2500;
};
#endif // NETWORK_H
+271 -137
View File
@@ -11,167 +11,229 @@
#include "ntripClient.h" #include "ntripClient.h"
NTRIPClient::NTRIPClient(SFE_UBLOX_GNSS *gnss, const char *host, uint16_t port, const char *mountPoint, const char *user, const char *password)
NTRIPClient::NTRIPClient(SFE_UBLOX_GNSS* gps, const char* host, uint16_t port, const char* mountPoint, const char* user, const char* password) { : gnss{gnss}, port{port}, ntripClient{new WiFiClient}, state{NTRIPClientStates::closingConnection}
this->gps = gps; {
strcpy(this->host, host); strcpy(this->host, host);
this->port = port;
strcpy(this->mountPoint, mountPoint); strcpy(this->mountPoint, mountPoint);
strcpy(this->user, user); strcpy(this->user, user);
strcpy(this->password, password); strcpy(this->password, password);
Component::loopDelay = NTRIPClient::loopDelay;
this->ntripClient = new WiFiClient;
this->state = NTRIPClientStates::closeConnection;
} }
NTRIPClient::~NTRIPClient() { NTRIPClient::~NTRIPClient()
{
delete this->ntripClient; delete this->ntripClient;
} }
void NTRIPClient::loop() { void NTRIPClient::run()
if (millis() - this->lastLoopTime < this->delayTime) {
return; switch (this->state)
this->lastLoopTime = millis(); {
case NTRIPClientStates::openingConnection:
if (millis() - this->lastGPGGAPushTime > this->pushGPGGATime && this->activated) { if (!this->activated)
this->lastGPGGAPushTime = millis(); {
// std::cout << "Try to push GPGGA data." << std::endl; this->state = NTRIPClientStates::closingConnection;
NMEA_GGA_data_t *data = new NMEA_GGA_data_t;
DebugTimes requestGpsData;
uint8_t res = this->gps->getLatestNMEAGPGGA(data);
requestGpsData.stopConsol("RequestGpsData", 5);
if (res == 2)
this->pushGPGGA(data);
delete data;
}
switch (this->state) {
case NTRIPClientStates::openConnection:
if (millis() - this->lastNtripConnectTime < this->tryReconnectTime)
break;
if (!this->activated) {
this->state = NTRIPClientStates::closeConnection;
break;
}
std::cout << "Connecting to the NTRIP caster..." << std::endl;
if (this->beginClient()) {
std::cout << "Connected to the NTRIP caster!" << std::endl;
this->state = NTRIPClientStates::pushData;
} else {
uint8_t seconds = this->tryReconnectTime / 1000;
std::cout << "Could not connect to the caster. Trying again in "
<< (int) seconds << " seconds." << std::endl;
this->lastNtripConnectTime = millis();
}
break; break;
}
case NTRIPClientStates::pushData: std::cout << "Connecting to the NTRIP caster..." << std::endl;
if (!processConnection() || !this->activated) if (this->beginClient())
this->state = NTRIPClientStates::closeConnection; {
break; std::cout << "Connected to the NTRIP caster!" << std::endl;
this->state = NTRIPClientStates::pushingData;
}
else
{
std::cout << "Failed!" << std::endl;
this->state = NTRIPClientStates::waiting;
this->lastReconnectTime = millis();
this->activated = false;
}
break;
case NTRIPClientStates::closeConnection: case NTRIPClientStates::pushingData:
std::cout << "Closing the connection to the NTRIP caster..." << std::endl; if (!processConnection() || !this->activated)
this->closeConnection(); {
state = NTRIPClientStates::wait; this->state = NTRIPClientStates::closingConnection;
break; }
break;
case NTRIPClientStates::wait: case NTRIPClientStates::closingConnection:
if (this->activated) std::cout << "Closing the connection to the NTRIP caster..." << std::endl;
this->state = NTRIPClientStates::openConnection; this->closeConnection();
if (this->activated) { state = NTRIPClientStates::waiting;
// std::cout << "state is openConnection" << std::endl; break;
}
break;
case NTRIPClientStates::notAvailable: case NTRIPClientStates::waiting:
break; if (this->activated)
{
this->state = NTRIPClientStates::openingConnection;
}
else
{
this->checkAutoReconnect();
}
break;
default: case NTRIPClientStates::notAvailable:
std::cout << "Wrong state in NTRIPClient.cpp..." << std::endl; break;
this->state = NTRIPClientStates::closeConnection;
break; default:
std::cout << "Wrong state in NTRIPClient.cpp..." << std::endl;
this->state = NTRIPClientStates::closingConnection;
break;
} }
} }
void NTRIPClient::gpsConfiguration() { void NTRIPClient::runAsChild()
this->gps->setSPIOutput(COM_TYPE_UBX | COM_TYPE_NMEA); {
this->gps->setPortInput(COM_PORT_SPI, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3); this->pushGPGGA();
}
void NTRIPClient::gnssConfiguration()
{
this->gnss->setSPIOutput(COM_TYPE_UBX | COM_TYPE_NMEA);
this->gnss->setPortInput(COM_PORT_SPI, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3);
// Set the differential mode - ambiguities are fixed whenever possible // Set the differential mode - ambiguities are fixed whenever possible
this->gps->setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED); this->gnss->setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED);
this->gps->setMainTalkerID(SFE_UBLOX_MAIN_TALKER_ID_GP); this->gnss->setMainTalkerID(SFE_UBLOX_MAIN_TALKER_ID_GP);
this->gps->enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_SPI, 10); this->gnss->enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_SPI);
} }
bool NTRIPClient::setActivated(bool b) { bool NTRIPClient::setActivated(bool state)
// std::cout << "NTRIPClient::setActivated: b - " << b << std::endl; {
if (b && this->state != NTRIPClientStates::notAvailable) if (state && this->state != NTRIPClientStates::notAvailable)
{
this->activated = true; this->activated = true;
else if (b) }
else if (state)
{
return false; return false;
}
else else
{
this->activated = false; this->activated = false;
this->autoReconnect = false;
}
return true; return true;
} }
bool NTRIPClient::beginClient() { void NTRIPClient::setAutoReconnect(bool state)
{
if (state)
{
this->reconnectAttemps = 0;
this->autoReconnect = true;
return;
}
this->autoReconnect = false;
}
bool NTRIPClient::beginClient()
{
static constexpr uint16_t httpError = 401;
static constexpr uint16_t httpCheck = 200;
std::cout << "Opening socket to " << this->host << std::endl; std::cout << "Opening socket to " << this->host << std::endl;
char serverRequest[this->bufferSize]; char serverRequest[this->bufferSize];
char credentials[this->bufferSize]; char credentials[this->bufferSize];
if (!this->ntripClient->connect(this->host, this->port)) { if (!static_cast<bool>(this->ntripClient->connect(static_cast<const char *>(this->host), this->port)))
{
std::cout << "Connection to caster failed" << std::endl; std::cout << "Connection to caster failed" << std::endl;
return false; return false;
} else { }
std::cout << "Connected to " << this->host << " : " << this->port << std::endl; std::cout << "Connected to " << this->host << " : " << this->port << std::endl;
std::cout << "Requesting NTRIP Data from mount point " << this->mountPoint << std::endl; std::cout << "Requesting NTRIP Data from mount point " << this->mountPoint << std::endl;
// Generate the server request (GET) // Generate the server request (GET)
snprintf(serverRequest, if (this->useNtripRev1)
{
snprintf(static_cast<char *>(serverRequest),
this->bufferSize, this->bufferSize,
"GET /%s HTTP/1.0\r\nUser-Agent: NTRIP SparkFun u-blox Client v1.0\r\n", static_cast<const char *>("GET /%s HTTP/1.0\r\nHost: %s:%u\r\nUser-Agent: NTRIP KleiaxNtripClient/0.1\r\nAccept: */*\r\nConnection: close\r\n"),
this->mountPoint); this->mountPoint,
this->host,
this->port);
}
else
{
snprintf(static_cast<char *>(serverRequest),
this->bufferSize,
static_cast<const char *>("GET /%s HTTP/1.1\r\nHost: %s:%u\r\nNtrip-Version: Ntrip/2.0\r\nUser-Agent: NTRIP KleiaxNtripClient/0.1\r\nAccept: */*\r\nConnection: close\r\n"),
this->mountPoint,
this->host,
this->port);
}
// Add own Position if activated
if (this->transmitLocation && !this->useNtripRev1)
{
std::cout << "NTRIPClient::beginClient - Add own position to server request." << std::endl;
auto *data = new NMEA_GGA_data_t;
const uint8_t res = this->gnss->getLatestNMEAGPGGA(data);
if (res > 0) // valid data
{
char positionUpdate[this->bufferSizePushGPGGA];
snprintf(static_cast<char *>(positionUpdate),
this->bufferSizePushGPGGA,
static_cast<const char *>("Ntrip-GGA: %s"),
data->nmea);
strncat(static_cast<char *>(serverRequest), static_cast<const char *>(positionUpdate), this->bufferSize);
}
else
{
std::cout << "NTRIPClient::beginClient - No valid data to send position to caster." << std::endl;
}
delete data;
this->lastGPGGAPushTime = millis();
}
if (this->user && this->password)
{
// Credentials // Credentials
uint8_t userCredentialsLength = strlen(this->user) + strlen(this->password) + 2; const uint8_t userCredentialsLength = strlen(this->user) + strlen(this->password) + 2;
char* userCredentials = new char[userCredentialsLength]; auto *userCredentials = new char[userCredentialsLength];
snprintf(userCredentials, userCredentialsLength, "%s:%s", this->user, this->password); snprintf(static_cast<char *>(userCredentials), userCredentialsLength, static_cast<const char *>("%s:%s"), this->user, this->password);
std::cout << "Sending credentials: " << userCredentials << std::endl; std::cout << "Sending credentials: " << userCredentials << std::endl;
//Encode // Encode
base64 b; const base64 base;
String strEncodedCredentials = b.encode(userCredentials); const String strEncodedCredentials = base64::encode(userCredentials);
delete userCredentials; delete userCredentials;
char encodedCredentials[strEncodedCredentials.length() + 1]; char encodedCredentials[strEncodedCredentials.length() + 1];
strEncodedCredentials.toCharArray(encodedCredentials, sizeof(encodedCredentials)); strEncodedCredentials.toCharArray(static_cast<char *>(encodedCredentials), sizeof(encodedCredentials));
snprintf(credentials, sizeof(credentials), "Authorization: Basic %s\r\n", encodedCredentials); snprintf(credentials, sizeof(credentials), static_cast<const char *>("Authorization: Basic %s\r\n"), static_cast<const char *>(encodedCredentials));
// Add the encoded credentials to the server request
strncat(static_cast<char *>(serverRequest), static_cast<const char *>(credentials), this->bufferSize);
} }
// Add the encoded credentials to the server request strncat(static_cast<char *>(serverRequest), static_cast<const char *>("\r\n"), this->bufferSize);
strncat(serverRequest, credentials, this->bufferSize);
strncat(serverRequest, "\r\n", this->bufferSize);
std::cout << "serverRequest size: " std::cout << static_cast<const char *>("serverRequest size: ")
<< strlen(serverRequest) << strlen(serverRequest)
<< " of " << static_cast<const char *>(" of ")
<< this->bufferSize << this->bufferSize
<< " bytes available" << static_cast<const char *>(" bytes available")
<< std::endl; << std::endl;
// Send the server request // Send the server request
std::cout << "Sending server request: " << serverRequest << std::endl; std::cout << "Sending server request: " << serverRequest << std::endl;
this->ntripClient->write(serverRequest, strlen(serverRequest)); this->ntripClient->write(serverRequest, strlen(serverRequest));
//Wait up to 5 seconds for response // Wait up to 5 seconds for response
uint32_t lastMillis = millis(); const uint32_t lastMillis = millis();
while (!ntripClient->available()) { while (static_cast<bool>(!ntripClient->available()))
if (millis() - lastMillis > this->timeOut) { {
if (millis() - lastMillis > this->timeOut)
{
std::cout << "Caster timed out!" << std::endl; std::cout << "Caster timed out!" << std::endl;
this->ntripClient->stop(); this->ntripClient->stop();
return false; return false;
@@ -179,35 +241,48 @@ bool NTRIPClient::beginClient() {
delay(10); delay(10);
} }
//Check reply // Check reply
uint16_t httpStatusCode = 0; uint16_t httpStatusCode = 0;
char response[this->bufferSize]; char response[this->bufferSize];
uint16_t responseIndex = 0; uint16_t responseIndex = 0;
while (this->ntripClient->available()) { while (static_cast<bool>(this->ntripClient->available()))
{
if (responseIndex == sizeof(response)) if (responseIndex == sizeof(response))
{
break; break;
}
response[responseIndex++] = ntripClient->read(); response[responseIndex++] = ntripClient->read();
if (httpStatusCode == 0) { if (httpStatusCode == 0)
if (strstr(response, "200") != nullptr) {
httpStatusCode = 200; if (strstr(response, static_cast<const char *>("200")) != nullptr)
if (strstr(response, "401") != nullptr) {
httpStatusCode = 401; httpStatusCode = httpCheck;
}
if (strstr(response, static_cast<const char *>("401")) != nullptr)
{
httpStatusCode = httpError;
}
} }
} }
response[responseIndex] = '\0'; response[responseIndex] = '\0';
// std::cout << "Caster response: " << response << std::endl; // std::cout << "Caster response: " << response << std::endl;
if (httpStatusCode != 200) { if (httpStatusCode != httpCheck)
std::cout << "Failed to connect to " << this->host << " - HTTP Code: " << (int) httpStatusCode {
std::cout << "Failed to connect to " << this->host << " - HTTP Code: " << (int)httpStatusCode
<< " Length of Response: " << responseIndex << std::endl; << " Length of Response: " << responseIndex << std::endl;
if (httpStatusCode == 0) if (httpStatusCode == 0)
{
std::cout << "Response: " << response << std::endl; std::cout << "Response: " << response << std::endl;
else if (httpStatusCode == 401) }
else if (httpStatusCode == httpError)
{
std::cout << "Statuscode 401 - Unauthorized" << std::endl; std::cout << "Statuscode 401 - Unauthorized" << std::endl;
}
return false; return false;
} }
@@ -216,35 +291,47 @@ bool NTRIPClient::beginClient() {
return true; return true;
} }
void NTRIPClient::closeConnection() { void NTRIPClient::closeConnection()
if (this->ntripClient->connected()) {
if (static_cast<bool>(this->ntripClient->connected()))
{
this->ntripClient->stop(); this->ntripClient->stop();
}
this->activated = false; this->activated = false;
std::cout << "NtripClient disconnected from: " << this->host << std::endl; std::cout << "NtripClient disconnected from: " << this->host << std::endl;
} }
bool NTRIPClient::processConnection() { bool NTRIPClient::processConnection()
if (this->ntripClient->connected()) { {
uint8_t rtcmData[this->bufferSize * 4]; if (static_cast<bool>(this->ntripClient->connected()))
{
uint8_t rtcmData[this->bufferSize * 8];
uint16_t rtcmCount = 0; uint16_t rtcmCount = 0;
while (this->ntripClient->available()) { while (static_cast<bool>(this->ntripClient->available()))
{
rtcmData[rtcmCount++] = ntripClient->read(); rtcmData[rtcmCount++] = ntripClient->read();
if (rtcmCount == sizeof(rtcmData)) if (rtcmCount == sizeof(rtcmData))
{
break; break;
}
} }
if (rtcmCount > 0) { if (rtcmCount > 0)
{
this->lastReceivedRtcmTime = millis(); this->lastReceivedRtcmTime = millis();
this->gps->pushRawData(rtcmData, rtcmCount); this->gnss->pushRawData(static_cast<uint8_t *>(rtcmData), rtcmCount);
// std::cout << "Pushed " << rtcmCount << " RTCM bytes to ZED." << std::endl; // std::cout << "Pushed " << rtcmCount << " RTCM bytes to ZED." << std::endl;
} }
} else { }
else
{
std::cout << "Connection to " << this->host << " dropped!" << std::endl; std::cout << "Connection to " << this->host << " dropped!" << std::endl;
return false; return false;
} }
if (millis() - this->lastReceivedRtcmTime > this->timeOut) { if (millis() - this->lastReceivedRtcmTime > this->timeOut)
{
std::cout << "RTCM timeout!" << std::endl; std::cout << "RTCM timeout!" << std::endl;
return false; return false;
} }
@@ -252,15 +339,62 @@ bool NTRIPClient::processConnection() {
return true; return true;
} }
void NTRIPClient::pushGPGGA(NMEA_GGA_data_t *nmeaData) { void NTRIPClient::checkAutoReconnect()
if (this->ntripClient->connected() && this->transmitLocation) {
this->ntripClient->print((const char *)nmeaData->nmea); if (!this->autoReconnect)
else {
std::cout << "Failed to pushing GGA to server: " << (const char *)nmeaData->nmea << std::endl; return;
}
if (millis() - this->lastReconnectTime < this->reconnectDelayTime)
{
return;
}
this->lastReconnectTime = millis();
if (this->reconnectAttemps >= this->maxReconnectAttemps)
{
this->autoReconnect = false;
return;
}
this->activated = true;
this->reconnectAttemps++;
} }
bool NTRIPClient::isConnected() { void NTRIPClient::pushGPGGA()
if (this->state == NTRIPClientStates::pushData) {
return true; if ((!this->transmitLocation || !this->activated) || !this->ntripClient->connected())
return false; {
return;
}
if (millis() - this->lastGPGGAPushTime < this->pushGPGGATime)
{
return;
}
this->lastGPGGAPushTime = millis();
auto *data = new NMEA_GGA_data_t;
const uint8_t res = this->gnss->getLatestNMEAGPGGA(data);
if (res > 0) // 2 means fresh data
{
char positionUpdate[this->bufferSizePushGPGGA];
snprintf(static_cast<char *>(positionUpdate),
this->bufferSizePushGPGGA,
static_cast<const char *>("%s"),
data->nmea);
this->ntripClient->write(positionUpdate, strlen(positionUpdate));
std::cout << "Position update: " << positionUpdate << std::endl;
}
else
{
std::cout << "NTRIPClient::pushGPGGA - No valid data to send position to caster." << std::endl;
}
delete data;
}
bool NTRIPClient::isConnected()
{
return this->state == NTRIPClientStates::pushingData;
} }
+89 -82
View File
@@ -19,17 +19,19 @@
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> #include <SparkFun_u-blox_GNSS_Arduino_Library.h>
#include "debugTimes.h" #include "debugTimes.h"
#include "component.h"
/** /**
* @brief States for the state machine. * @brief States for the state machine.
* *
*/ */
enum NTRIPClientStates { enum NTRIPClientStates
openConnection, {
pushData, openingConnection,
closeConnection, pushingData,
wait, closingConnection,
notAvailable waiting,
notAvailable
}; };
/** /**
@@ -39,93 +41,98 @@ enum NTRIPClientStates {
* data and push it to a given gnss module. This module have to be compatible * data and push it to a given gnss module. This module have to be compatible
* with the SparkFun u-blox GNSS Arduino Library. * with the SparkFun u-blox GNSS Arduino Library.
*/ */
class NTRIPClient { class NTRIPClient : public Component
public: {
/** public:
* @brief Construct a new NTRIPClient object /**
* * @brief Construct a new NTRIPClient object
* @param gps The Gnss module *
* @param host * @param gnss The Gnss module
* @param port * @param host
* @param mountPoint * @param port
* @param user * @param mountPoint
* @param password * @param user
*/ * @param password
NTRIPClient(SFE_UBLOX_GNSS* gps, const char* host, uint16_t port, const char* mountPoint, const char* user, const char* password); */
~NTRIPClient(); NTRIPClient(SFE_UBLOX_GNSS *gnss, const char *host, uint16_t port, const char *mountPoint, const char *user = nullptr, const char *password = nullptr);
~NTRIPClient();
/** /**
* @brief Runs the state machine. * @brief Configure the Gnss module to accept correction data
* *
* See NTRIPClientStates for more information. */
* Should be called ever main loop. void gnssConfiguration();
*/
void loop();
/** /**
* @brief Configure the Gnss module to accept correction data * @brief Activate or deactivate the location transmission
* *
*/ * Some server need the position of the Gnss module to send the
void gpsConfiguration(); * right correction data.
*
* @param b
*/
void setTransmitLocation(bool b) { this->transmitLocation = b; }
/** /**
* @brief Activate or deactivate the location transmission * @brief Activate or deactivate the connection to the server.
* *
* Some server need the position of the Gnss module to send the * @param state
* right correction data. * @return true success
* * @return false failure
* @param b */
*/ bool setActivated(bool state);
void setTransmitLocation(bool b) { this->transmitLocation = b; } void setAutoReconnect(bool state);
void useOutdatedNtripRev1 (bool rev1 = false ) { this->useNtripRev1 = rev1; }
/** bool isConnected();
* @brief Activate or deactivate the connection to the server.
*
* @param b
* @return true success
* @return false failure
*/
bool setActivated(bool b);
bool isConnected(); /**
* @brief Get the Client State object
*
* Returns the state of the State machine
*
* @return NTRIPClientStates
*/
NTRIPClientStates getClientState() { return this->state; }
/** private:
* @brief Get the Client State object void run() override;
* void runAsChild() override;
* Returns the state of the State machine void pushGPGGA();
* bool beginClient();
* @return NTRIPClientStates void closeConnection();
*/ bool processConnection();
NTRIPClientStates getClientState() { return this->state; } void checkAutoReconnect();
private: SFE_UBLOX_GNSS *gnss;
void pushGPGGA(NMEA_GGA_data_t *nmeaData); WiFiClient *ntripClient;
bool beginClient(); NTRIPClientStates state = NTRIPClientStates::notAvailable;
void closeConnection();
bool processConnection();
SFE_UBLOX_GNSS* gps; bool transmitLocation = false;
WiFiClient* ntripClient; bool activated = true;
NTRIPClientStates state = NTRIPClientStates::notAvailable; bool autoReconnect = false;
bool useNtripRev1 = false;
bool transmitLocation = true; uint8_t reconnectAttemps = 0;
bool activated = true; uint16_t port;
uint32_t lastReceivedRtcmTime = 0;
// uint32_t lastNtripConnectTime = 0; // can deleted?
uint32_t lastGPGGAPushTime = 0;
uint32_t lastReconnectTime = 0;
uint16_t port; static const uint8_t connectionDataLength = 32;
uint32_t lastReceivedRtcmTime = 0; char host[connectionDataLength];
uint32_t lastNtripConnectTime = 0; char mountPoint[connectionDataLength];
uint32_t lastGPGGAPushTime = 0; char user[connectionDataLength];
uint32_t lastLoopTime = 0; char password[connectionDataLength];
const uint8_t maxReconnectAttemps = 10;
const uint16_t reconnectDelayTime = 5000;
const uint16_t timeOut = 10000;
const uint16_t bufferSize = 512;
const uint16_t bufferSizePushGPGGA = 128;
const uint16_t pushGPGGATime = 5000;
char host[128]; static constexpr uint8_t loopDelay = 20;
char mountPoint[128];
char user[128];
char password[128];
const uint8_t delayTime = 20;
const uint16_t timeOut = 5000;
const uint16_t tryReconnectTime = 5000;
const uint16_t bufferSize = 512;
const uint16_t pushGPGGATime = 10000;
}; };
#endif #endif
+144
View File
@@ -0,0 +1,144 @@
/**
* @file point.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-03
*
* @copyright Copyright (c) 2023
*
*/
#include "point.h"
Point::Point(double lat, double lon, uint32_t horizontalAccuracy, uint32_t creationTime)
: coordinates{lat, lon}
{
this->init(horizontalAccuracy, creationTime);
}
Point::Point(int32_t lat, int32_t lon, uint32_t horizontalAccuracy, uint32_t creationTime)
: coordinates{lat / 10000000.0, lon / 10000000.0}
{
this->init(horizontalAccuracy, creationTime);
}
Point::Point(Coordinates coords, uint32_t horizontalAccuracy, uint32_t creationTime)
: coordinates{coords}
{
this->init(horizontalAccuracy, creationTime);
}
Point::Point(Coordinates coords, bool imported)
{
this->coordinates = coords;
if (imported)
{
this->init(UINT32_MAX, 0);
}
else
{
this->init(0, 0);
}
}
Point::Point()
{
this->coordinates.lat = 0;
this->coordinates.lon = 0;
this->init(0, 0);
}
bool Point::operator==(const Point &rhs) const
{
return this->coordinates == rhs.getCoordinates();
}
double Point::distanceTo(const Coordinates &point) const
{
// Old implementation
// const Coordinates begin = this->coordinates;
// const Coordinates end = point;
// const double lat = (begin.lat + end.lat) / 2 * ROUTE_DEGREE_TO_RADIANT;
// const double dy = ROUTE_DISTANCE_BETWEEN_LATITUDE * (begin.lat - end.lat);
// const double dx = ROUTE_DISTANCE_BETWEEN_LATITUDE * cos(lat) * (begin.lon - end.lon);
// return sqrt(dx * dx + dy * dy);
double latStart = this->toRad(this->coordinates.lat);
double lonStart = this->toRad(this->coordinates.lon);
double latEnd = this->toRad(point.lat);
double lonEnd = this->toRad(point.lon);
const double earthRadius = 6371.0; //km
double cartesianX_1 = cos(latStart) * lonStart * earthRadius;
double cartesianY_1 = latStart * earthRadius;
double cartesianX_2 = cos(latEnd) * lonEnd * earthRadius;
double cartesianY_2 = latEnd * earthRadius;
return sqrt(pow(cartesianX_2 - cartesianX_1, 2)
+ pow(cartesianY_2 - cartesianY_1, 2));
}
double Point::distanceTo(const Point &point) const
{
return this->distanceTo(point.getCoordinates());
}
int16_t Point::courseTo(const Coordinates &point) const
{
// const Coordinates begin = this->coordinates;
// const Coordinates end = point;
// const double phi = log(tan(end.lat * ROUTE_DEGREE_TO_RADIANT / 2 + M_PI / 4) / tan(begin.lat * ROUTE_DEGREE_TO_RADIANT / 2 + M_PI / 4));
// const double lon = (begin.lon * ROUTE_DEGREE_TO_RADIANT - end.lon * ROUTE_DEGREE_TO_RADIANT);
// return static_cast<int16_t>(atan2(lon, phi) / ROUTE_DEGREE_TO_RADIANT) * -1;
double latStart = this->toRad(this->coordinates.lat);
double lonStart = this->toRad(this->coordinates.lon);
double latEnd = this->toRad(point.lat);
double lonEnd = this->toRad(point.lon);
double y = sin(lonEnd - lonStart) * cos(latEnd);
double x = cos(latStart) * sin(latEnd) - sin(latStart) * cos(latEnd) * cos(lonEnd - lonStart);
double theta = atan2(y, x);
return static_cast<int16_t>(this->toDeg(theta)) % 360;
}
int16_t Point::courseTo(const Point &point) const
{
return this->courseTo(point.getCoordinates());
}
void Point::init(uint32_t horizontalAccuracy, uint32_t creationTime)
{
this->creationTime = creationTime;
if (horizontalAccuracy == UINT32_MAX)
{
this->accuracy = Accuracy::imported;
}
else if (horizontalAccuracy > 9999)
{
this->accuracy = Accuracy::fourDigOfCM;
}
else if (horizontalAccuracy > 999)
{
this->accuracy = Accuracy::threeDigOfCM;
}
else if (horizontalAccuracy > 99)
{
this->accuracy = Accuracy::twoDigOfCM;
}
else if (horizontalAccuracy > 1)
{
this->accuracy = Accuracy::oneDigOfCM;
}
else
{
this->accuracy = Accuracy::none;
}
}
+152
View File
@@ -0,0 +1,152 @@
/**
* @file point.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-03
*
* @copyright Copyright (c) 2023
*
*/
#ifndef POINT_H
#define POINT_H
#include <cmath>
#define ROUTE_DEGREE_TO_RADIANT 0.01745
#define ROUTE_DISTANCE_BETWEEN_LATITUDE 111300
/**
* @brief A class to handle points on the earth
*
* The points inherits latitude and longitude as doubles
*
*/
class Point
{
public:
/**
* @brief Hold the data longitude and latitude
*
*/
struct Coordinates
{
double lon;
double lat;
bool operator==(const Coordinates rhs) const
{
return (this->lon == rhs.lon) && (this->lon == rhs.lon);
}
};
/**
* @brief The Accuracy is set by the constructor
*
*/
enum Accuracy
{
none,
fourDigOfCM,
threeDigOfCM,
twoDigOfCM,
oneDigOfCM,
imported
};
/**
* @brief Construct a new Point object
*
* @param lat
* @param lon
* @param horizontalAccuracy
* @param creationTime
*/
Point(double lat, double lon, uint32_t horizontalAccuracy = 0, uint32_t creationTime = 0);
Point(int32_t lat, int32_t lon, uint32_t horizontalAccuracy = 0, uint32_t creationTime = 0);
Point(Coordinates coords, uint32_t horizontalAccuracy = 0, uint32_t creationTime = 0);
Point(Coordinates coords, bool imported);
Point();
/**
* @brief Checks if to points are equal.
*
* @param rhs
* @return true
* @return false
*/
bool operator==(const Point &rhs) const;
/**
* @brief Checks if the point is initalized.
*
* @return true
* @return false
*/
bool isInit() const { return this->coordinates.lat + this->coordinates.lon; }
/**
* @brief Checks if the point is valid.
*
* If the accuracy is higher than zero, true will be returned.
*
* @return true
* @return false
*/
bool isValid() const { return (this->accuracy > 0) ? true : false; }
/**
* @brief Calculates the distance between to points.
*
* @param point
* @return double meter
*/
double distanceTo(const Coordinates &point) const;
double distanceTo(const Point &point) const;
/**
* @brief Calculates the course to an other point.
*
* @param point
* @return int16_t degree
*/
int16_t courseTo(const Coordinates &point) const;
int16_t courseTo(const Point &point) const;
uint32_t getCreationTime() const { return this->creationTime; }
double getLongitude() const { return this->coordinates.lon; }
double getLatitude() const { return this->coordinates.lat; }
Coordinates getCoordinates() const { return this->coordinates; }
/**
* @brief Get the Accuracy object
*
* The higher the value, the greater the accuracy.
* You can check it by Accuracy.
*
* @return Accuracy
*/
Accuracy getAccuracy() const { return this->accuracy; }
private:
void init(uint32_t horizontalAccuracy, uint32_t creationTime);
double toRad (double degree) const
{
constexpr double radFactor = M_PI / 180.0;
return degree * radFactor;
};
double toDeg(double radiant) const
{
constexpr double degFactor = 180.0 / M_PI;
return radiant * degFactor;
};
Accuracy accuracy = Accuracy::none;
Coordinates coordinates{0, 0};
uint32_t creationTime = 0;
};
#endif // POINT_H
+107
View File
@@ -0,0 +1,107 @@
/**
* @file route.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief Implements the class Route and Point
* @version 0.1
* @date 2022-01-31
*
* @copyright Copyright (c) 2022
*
*/
#include "route.h"
Route Route::routeCache = Route();
void Route::addPointToRoute(Point point)
{
this->points.push_back(point);
}
void Route::clear()
{
this->points.clear();
this->currentPoint = 0;
this->started = false;
}
Point Route::startRoute()
{
if (this->points.empty())
{
this->started = false;
return Point();
}
this->it = this->points.begin();
this->currentPoint = 1;
this->started = true;
return *this->it;
}
Point Route::endRoute()
{
if (this->points.empty())
{
this->started = false;
return Point();
}
this->it = this->points.end();
// TODO: Understand why i have to decrement the iterator first to get realy the last element.
this->it--;
this->currentPoint = this->points.size();
this->started = true;
return *this->it;
}
Point Route::getNextPoint()
{
Point point;
if (!this->started)
{
return point;
}
if (this->it != --this->points.end())
{
this->it++;
this->currentPoint++;
return *this->it;
// } else if (this->it == this->points.end() && this->currentPoint != this->points.size()) {
// this->currentPoint++;
// return *this->it;
}
return point;
}
Point Route::getPreviousPoint()
{
Point point;
if (!this->started)
{
return point;
}
if (this->it != this->points.begin())
{
this->it--;
this->currentPoint--;
return *this->it;
}
return point;
}
RouteInfo Route::getRouteInfo()
{
RouteInfo info{0, 0};
info.totalPoints = this->points.size();
info.currentPoint = this->currentPoint;
return info;
}
Route& Route::getRouteCache() {
return Route::routeCache;
}
+115
View File
@@ -0,0 +1,115 @@
/**
* @file route.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains the class Route
* @version 0.1
* @date 2022-01-31
*
* @copyright Copyright (c) 2022
*
*/
#ifndef ROUTE_H
#define ROUTE_H
#include <cstdint>
#include <list>
#include "point.h"
/**
* @brief Holds some route information
*
*/
struct RouteInfo
{
/**
* @brief Selected number of Points
*/
uint16_t currentPoint;
/**
* @brief Total points stored in route
*/
uint16_t totalPoints;
};
/**
* @brief A class to manage multiple points
*
* The list of point presents a route which can be driven
*/
class Route
{
public:
/**
* @brief Adds a point to the list.
*
* @param point
*/
void addPointToRoute(Point point);
/**
* @brief Delete all points
*/
void clear();
/**
* @brief Select the first point as target.
*
* @return Point
*/
Point startRoute();
/**
* @brief Select the last point as target.
*
* @return Point
*/
Point endRoute();
/**
* @brief Get the next point and set it as target.
*
* @return Point is zero if there are no more Points.
*/
Point getNextPoint();
/**
* @brief Get the previous point and set it as target.
*
* @return Point
*/
Point getPreviousPoint();
/**
* @brief Get the Route Info object
*
* @return RouteInfo
*/
RouteInfo getRouteInfo();
/**
* @brief Get the Started object
*
* The Route will be marked as started when startRoute or
* endRoute has been called.
*
* @return true
* @return false
*/
bool getStarted() const { return this->started; }
static Route& getRouteCache();
private:
uint16_t currentPoint = 0;
bool started = false;
std::list<Point> points;
std::list<Point>::iterator it;
static Route routeCache;
};
#endif // ROUTE_H
+286
View File
@@ -0,0 +1,286 @@
/**
* @file sensorData.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-02
*
* @copyright Copyright (c) 2023
*
*/
#include "sensorData.h"
bool SensorData::outputStatusPrintPVTdata = false;
uint32_t SensorData::ubxUpdateTimeStatic = 0;
UBX_NAV_PVT_data_t *SensorData::ubxDataStatic = nullptr;
SensorData::SensorData()
{
Component::loopDelay = SensorData::loopDelay;
}
SensorData::~SensorData()
{
delete this->ntripClient;
}
void SensorData::enableNtrip(String host, uint16_t port, String mountPoint, String user, String password, bool sendOwnPosition)
{
this->ntripClient = new NTRIPClient(this->gnss, host.c_str(), port, mountPoint.c_str(), user.c_str(), password.c_str());
this->ntripClient->gnssConfiguration();
this->ntripClient->loop();
this->ntripClient->setTransmitLocation(sendOwnPosition);
this->ntripClient->setActivated(false);
this->isNtripInit = true;
this->addChildComponent(this->ntripClient);
}
void SensorData::enableGnss(SPIClass *spiPort, uint8_t csPin)
{
this->gnss = new SFE_UBLOX_GNSS();
if (this->gnss->begin(*spiPort, csPin, 4000000) == false)
{
std::cout << "u-blox GNSS not detected on SPI bus. Please check wiring. Freezing." << std::endl;
while (true)
{
}
}
this->initGnss();
}
void SensorData::enableGnss()
{
this->gnss = new SFE_UBLOX_GNSS();
if (this->gnss->begin() == false)
{
std::cout << "u-blox GNSS not detected at default I2C address. Please check wiring. Freezing." << std::endl;
while (true)
{
}
}
this->initGnss();
}
void SensorData::enableRealCompass()
{
static constexpr byte address = 0x0d;
this->realCompass = new QMC5883LCompass();
// Init Compass
Wire.beginTransmission(address);
// TODO: describe Bytes !!!
Wire.write(0x0b);
Wire.write(0x01);
Wire.endTransmission();
this->realCompass->setMode(0x01, 0x0C, 0x10, 0X00);
CalibrateCompass caliCompass(this->realCompass);
caliCompass.loadData();
caliCompass.useData();
}
void SensorData::enableCalcCompass()
{
// TODO: !!! implementieren
}
void SensorData::enableGyroscope()
{
this->gyroscope = new MPU6050();
this->gyroscope->initialize();
if (!this->gyroscope->testConnection())
{
std::cout << "SensorData::enableGyroscope: Gyroscope is not connected. Freeze!" << std::endl;
while (true)
{
}
}
const uint8_t deviceStatus = this->gyroscope->dmpInitialize();
// TODO: !!! MagicNumer 6x
this->gyroscope->setXGyroOffset(220);
this->gyroscope->setYGyroOffset(76);
this->gyroscope->setZGyroOffset(-85);
this->gyroscope->setZAccelOffset(1788);
if (deviceStatus == 0)
{
this->gyroscope->CalibrateAccel(6);
this->gyroscope->CalibrateGyro(6);
// this->gyroscope->PrintActiveOffsets();
this->gyroscope->setDMPEnabled(true);
}
else
{
// ERROR!
// 1 = initial memory load failed
// 2 = DMP configuration updates failed
// (if it's going to break, usually the code will be 1)
std::cout << "SensorData::enableGyroscope: DMP Initialization failed (code" << static_cast<int>(deviceStatus) << "). Freeze!" << std::endl;
while (true)
{
}
}
}
CalcAzimuth::State SensorData::getCalcAzimuthState() const
{
if (static_cast<bool>(this->calcCompass))
{
return this->calcCompass->getState();
}
return CalcAzimuth::State::Invalid;
}
NTRIPClientStates SensorData::getNtripState() const
{
if (static_cast<bool>(this->ntripClient))
{
return this->ntripClient->getClientState();
}
return NTRIPClientStates::notAvailable;
}
void SensorData::printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{
static constexpr uint8_t stringSize = 32;
if (!SensorData::outputStatusPrintPVTdata)
{
return;
}
const double latitude = ubxDataStruct->lat / 10000000.0;
const double longitude = ubxDataStruct->lon / 10000000.0;
const double altitude = ubxDataStruct->hMSL / 1000.0;
const uint8_t fixType = ubxDataStruct->fixType;
char fixTypeString[stringSize];
if (fixType == 0)
{
strcpy(fixTypeString, static_cast<const char *>("None"));
}
else if (fixType == 1)
{
strcpy(fixTypeString, static_cast<const char *>("Dead Reckoning"));
}
else if (fixType == 2)
{
strcpy(fixTypeString, static_cast<const char *>("2D"));
}
else if (fixType == 3)
{
strcpy(fixTypeString, static_cast<const char *>("3D"));
}
else if (fixType == 3)
{
strcpy(fixTypeString, static_cast<const char *>("GNSS + Dead Reckoning"));
}
else if (fixType == 5)
{
strcpy(fixTypeString, static_cast<const char *>("Time Only"));
}
else
{
strcpy(fixTypeString, static_cast<const char *>("UNKNOWN"));
}
const uint8_t carrSoln = ubxDataStruct->flags.bits.carrSoln;
char carrSolnString[stringSize];
if (carrSoln == 0)
{
strcpy(carrSolnString, static_cast<const char *>("None"));
}
else if (carrSoln == 1)
{
strcpy(carrSolnString, static_cast<const char *>("Floating"));
}
else if (carrSoln == 2)
{
strcpy(carrSolnString, static_cast<const char *>("Fixed"));
}
else
{
strcpy(carrSolnString, static_cast<const char *>("UNKNOWN"));
}
const uint32_t hAcc = ubxDataStruct->hAcc;
std::cout << "Lat: " << latitude
<< " Lng: " << longitude
<< " Alt: " << altitude << std::endl;
std::cout << "Fix: " << fixTypeString
<< " Carrier Solution: " << carrSolnString
<< " Horizontal Accuracy Estimate: " << hAcc << " mm" << std::endl;
}
void SensorData::savePVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{
SensorData::printPVTdata(ubxDataStruct);
SensorData::ubxDataStatic = ubxDataStruct;
SensorData::ubxUpdateTimeStatic = millis();
}
void SensorData::setOutputStatusPrintPVTdata(bool status)
{
SensorData::outputStatusPrintPVTdata = status;
}
void SensorData::run()
{
if (static_cast<bool>(this->realCompass))
{
this->realCompass->read();
this->realAzimuth = this->realCompass->getAzimuth();
}
if (static_cast<bool>(this->gyroscope) && this->gyroscope->dmpGetCurrentFIFOPacket(static_cast<uint8_t *>(this->gyroBuffer)))
{
this->gyroscope->dmpGetQuaternion(&this->quaternion, static_cast<uint8_t *>(this->gyroBuffer));
this->gyroscope->dmpGetGravity(&this->gravity, &this->quaternion);
this->gyroscope->dmpGetYawPitchRoll(static_cast<float *>(this->yawPitchRoll), &this->quaternion, &this->gravity);
}
}
void SensorData::runAsChild()
{
if (static_cast<bool>(this->gnss))
{
this->gnss->checkUblox();
this->gnss->checkCallbacks();
if (SensorData::ubxUpdateTimeStatic != this->lastUbxUpdate)
{
this->updateUbxData();
}
}
}
void SensorData::initGnss()
{
const uint8_t versionHigh = this->gnss->getProtocolVersionHigh();
const uint8_t versionLow = this->gnss->getProtocolVersionLow();
std::cout << "u-blox protocol version: " << static_cast<int>(versionHigh) << "." << static_cast<int>(versionLow) << std::endl;
this->gnss->setSPIOutput(COM_TYPE_UBX);
this->gnss->enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_SPI);
this->gnss->setUSBOutput(COM_TYPE_UBX | COM_TYPE_NMEA);
this->gnss->setAutoPVTcallbackPtr(&(SensorData::savePVTdata));
// SensorData::setOutputStatusPrintPVTdata(true);
this->gnss->setNavigationFrequency(1);
this->gnss->setAutoPVT(true);
}
void SensorData::updateUbxData()
{
this->gnssData = SensorData::ubxDataStatic;
this->lastUbxUpdate = SensorData::ubxUpdateTimeStatic;
Point::Coordinates coords{0, 0};
coords.lat = this->gnssData->lat / 10000000.0;
coords.lon = this->gnssData->lon / 10000000.0;
this->currentPosition = Point(coords, this->gnssData->hAcc);
}
+180
View File
@@ -0,0 +1,180 @@
/**
* @file sensorData.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains the SensorData class
* @version 0.1
* @date 2023-09-02
*
* @copyright Copyright (c) 2023
*
*/
#ifndef SENSOR_DATA_H
#define SENSOR_DATA_H
#include <SPI.h>
#include <I2Cdev.h>
#include <iostream>
#include "component.h"
#include "calibrateCompass.h"
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
#include <QMC5883LCompass.h>
#include <MPU6050_6Axis_MotionApps612.h>
#include "calcAzimuth.h"
#include "ntripClient.h"
#include "point.h"
/**
* @brief A class to manage all sensors
*
* Each sensor have separately to be enabled
*/
class SensorData : public Component
{
public:
SensorData();
~SensorData();
void enableNtrip(String host, uint16_t port, String mountPoint, String user, String password, bool sendOwnPosition = false);
/**
* @brief Enable the gnss module over spi
*
* @param spiPort
* @param csPin
*/
void enableGnss(SPIClass *spiPort, uint8_t csPin);
/**
* @brief Enable the gnss module over i2c
*/
void enableGnss();
void enableRealCompass();
void enableCalcCompass();
void enableGyroscope();
// Interface Const
/**
* @brief Get the azimuth measured by the compass module
*
* @return int16_t
*/
int16_t getRealAzimuth() const { return this->realAzimuth; }
/**
* @brief Get the azimuth calculated by CalcAzimuth
*
* Consider to call getCalcAzimuthState() to check, if the data is valid.
*
* @return int16_t
*/
int16_t getCalcAzimuth() const { return this->calcAzimuth; }
/**
* @brief Get the CalcAzimuth::State object
*
* Needed to check the quality of calculated azimuth
*
* @return CalcAzimuth::State
*/
CalcAzimuth::State getCalcAzimuthState() const;
Point getCurrentPos() const { return this->currentPosition; }
const UBX_NAV_PVT_data_t *getGnssData() const { return this->gnssData; };
NTRIPClientStates getNtripState() const;
/**
* @brief Get the data from the gyroscope
*
* The returned float pointer is an array of 3 floats
* - Yaw
* - Pitch
* - Roll
*
* @return const float*
*/
const float *getGyroData() const { return this->yawPitchRoll; }
/**
* @brief Get the CalcCompass object
* @return CalcAzimuth*
*/
CalcAzimuth *getCalcCompass() const { return this->calcCompass; }
/**
* @brief Get the RealCompass object
* @return QMC5883LCompass*
*/
QMC5883LCompass *getRealCompass() const { return this->realCompass; }
/**
* @brief Get the NTRIPClient object
* @return NTRIPClient*
*/
NTRIPClient *getNtripClient() const { return this->ntripClient; }
/**
* @brief Get the Gyroscope object
* @return MPU6050*
*/
MPU6050 *getGyroscope() const { return this->gyroscope; }
// static
/**
* @brief Set the output status for PVTdata.
*
* If this is true, a lot of information from the gnss module will be printed in
* the interval of navigation frequency.
*
* @param status
*/
static void setOutputStatusPrintPVTdata(bool status);
private:
void run() override;
void runAsChild() override;
void initGnss();
void updateUbxData();
QMC5883LCompass *realCompass = nullptr;
CalcAzimuth *calcCompass = nullptr;
SFE_UBLOX_GNSS *gnss = nullptr;
NTRIPClient *ntripClient = nullptr;
MPU6050 *gyroscope = nullptr;
UBX_NAV_PVT_data_t *gnssData = nullptr;
Point currentPosition;
Quaternion quaternion;
VectorFloat gravity;
char *host = nullptr;
char *mountPoint = nullptr;
char *user = nullptr;
char *password = nullptr;
bool isNtripInit = false;
uint8_t gyroBuffer[64];
uint16_t port = 0;
int16_t realAzimuth = INT16_MAX;
int16_t calcAzimuth = INT16_MAX;
uint32_t lastUbxUpdate = 0;
float yawPitchRoll[3]{0, 0, 0};
// static
static void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct);
static void savePVTdata(UBX_NAV_PVT_data_t *ubxDataStruct);
static UBX_NAV_PVT_data_t *ubxDataStatic;
static uint32_t ubxUpdateTimeStatic;
static bool outputStatusPrintPVTdata;
static constexpr uint8_t loopDelay = 50;
};
#endif // SENSOR_DATA_H
+99 -103
View File
@@ -11,148 +11,144 @@
*/ */
#include "speedometer.h" #include "speedometer.h"
Speedometer::Speedometer(uint8_t pin, double diameter, uint16_t steps, uint8_t numOfValForAvg) { Speedometer::Speedometer(uint8_t pin, double diameter, uint16_t steps)
this->init(pin, diameter, steps); : pulseCounter{new Counter(pin)}, diameter{diameter}, steps{steps}, buf{}
this->bufSize = numOfValForAvg; {
} this->pulseCounter->setFilterValue(Speedometer::maxFilterValue); // ignore pulses less than 1000 x 2.5ns
Speedometer::Speedometer(uint8_t pin, double diameter, uint16_t steps) {
this->init(pin, diameter, steps);
}
Speedometer::~Speedometer() {
delete[] this->buf;
delete this->pulseCounter;
}
uint16_t Speedometer::loop() {
if (this->calibrationRunning)
return -1;
uint32_t time = millis();
uint16_t elapsedTime = time - this->lastMillisLoop;
//Cancel if delayLoop is not reached
if (elapsedTime < this->delayLoop)
return elapsedTime;
runSpeedometer();
this->lastMillisLoop = time;
return elapsedTime;
}
void Speedometer::runSpeedometer() {
uint32_t time = millis();
uint16_t elapsedTime = time - this->lastMillisCalc;
this->lastMillisCalc = time;
this->addValToBuf(this->pulseCounter->getValue());
this->pulseCounter->clear(); this->pulseCounter->clear();
this->pulseCounter->resume(); this->pulseCounter->resume();
Component::loopDelay = Speedometer::loopDelay;
double n = (double)this->calcAverage() / this->steps; // Wheel revolutions in absolute time this->clearAvgBuf();
double u = n / ((double)elapsedTime / 1000); // Wheel revolutions per second
double ms = u * (diameter * PI); // Speed in m/s
switch (this->currentDirection) {
case Direction::Forward :
this->speed = ms;
break;
case Direction::Backward :
this->speed = -ms;
break;
case Direction::None :
this->speed = 0;
break;
}
// if (this->speed)
// this->printCounter++;
// if (this->printCounter > 10) {
// this->printCounter = 0;
// std::cout << "Speedometer::runSpeedometer speed: " << (int) this->speed << std::endl;
// }
} }
void Speedometer::setDirection(Direction dir) { Speedometer::~Speedometer()
if (this->currentDirection == dir) {
delete this->pulseCounter;
}
void Speedometer::run()
{
static constexpr float minimalSpeed = 0.1;
if (this->calibrationRunning)
{
return; return;
}
const uint32_t time = millis();
const uint16_t elapsedTime = time - this->lastMillisCalc;
this->lastMillisCalc = time;
const double pulse = this->pulseCounter->getValue();
this->pulseCounter->clear();
this->pulseCounter->resume();
const double wheelRevolutionsAbsolute = pulse / this->steps;
const double wheelRevolutionsRelativ = wheelRevolutionsAbsolute / (elapsedTime / 1000.0);
double meterPerSecond = wheelRevolutionsRelativ * (diameter * PI);
double radPerSecond = wheelRevolutionsRelativ * 2 * PI;
if (meterPerSecond < minimalSpeed)
{
meterPerSecond = 0;
radPerSecond = 0;
}
switch (this->currentDirection)
{
case Direction::Forward:
this->speed = meterPerSecond;
this->rad = radPerSecond;
break;
case Direction::Backward:
this->speed = -meterPerSecond;
this->rad = -radPerSecond;
break;
case Direction::None:
this->speed = 0;
this->rad = 0;
break;
}
this->addValToBuf(static_cast<int16_t>(this->speed * Speedometer::conversionFactor));
}
void Speedometer::setDirection(Direction dir)
{
if (this->currentDirection == dir)
{
return;
}
this->currentDirection = dir; this->currentDirection = dir;
this->clearAvgBuf(); this->clearAvgBuf();
} }
void Speedometer::setNumOfValForAvg(uint8_t val) { void Speedometer::setEncFilter(uint16_t val)
this->bufSize = val; {
updateAvgBufSize(); if (val > Speedometer::maxFilterValue)
} {
val = Speedometer::maxFilterValue;
void Speedometer::setEncFilter(uint16_t val) { }
if (val > 1023)
val = 1023;
this->pulseCounter->setFilterValue(val); this->pulseCounter->setFilterValue(val);
} }
void Speedometer::calibrationMeasurementStart() { double Speedometer::getAvgSpeed() const
{
const double avg = this->calcAverage();
return avg / Speedometer::conversionFactor;
}
void Speedometer::calibrationMeasurementStart()
{
std::cout << "Start" << std::endl; std::cout << "Start" << std::endl;
this->calibrationRunning = true; this->calibrationRunning = true;
this->pulseCounter->clear(); this->pulseCounter->clear();
this->pulseCounter->resume(); this->pulseCounter->resume();
} }
uint16_t Speedometer::calibrationMeasurementStop() { uint16_t Speedometer::calibrationMeasurementStop()
{
std::cout << "Ende" << std::endl; std::cout << "Ende" << std::endl;
this->calibrationRunning = false; this->calibrationRunning = false;
uint16_t res = abs(this->pulseCounter->getValue()); const uint16_t res = abs(this->pulseCounter->getValue());
this->pulseCounter->clear(); this->pulseCounter->clear();
this->pulseCounter->resume(); this->pulseCounter->resume();
std::cout << "Result: " << res << std::endl; std::cout << "Result: " << res << std::endl;
return res; return res;
} }
void Speedometer::init(uint8_t pin, double diameter, uint16_t steps) { void Speedometer::clearAvgBuf()
this->diameter = diameter; {
this->steps = steps;
this->pulseCounter = new Counter(pin);
this->pulseCounter->setFilterValue(1000); // ignore pulses less than 1000 x 2.5ns
this->pulseCounter->clear();
this->pulseCounter->resume();
initAvgBuf();
}
void Speedometer::initAvgBuf() {
this->buf = new int16_t[bufSize];
for (uint8_t i = 0; i < bufSize; i++) for (uint8_t i = 0; i < bufSize; i++)
{
this->buf[i] = 0; this->buf[i] = 0;
}
} }
void Speedometer::clearAvgBuf() { void Speedometer::addValToBuf(int16_t val)
for (uint8_t i = 0; i < bufSize; i++) {
this->buf[i] = 0;
}
void Speedometer::addValToBuf(int16_t val) {
this->buf[this->bufPos] = val; this->buf[this->bufPos] = val;
this->bufPos++; this->bufPos++;
if (bufPos == bufSize) if (bufPos == bufSize)
bufPos = 0; {
bufPos = 0;
}
} }
void Speedometer::updateAvgBufSize() { int16_t Speedometer::calcAverage() const
delete[] this->buf; {
initAvgBuf();
}
int16_t Speedometer::calcAverage() {
int16_t sum = 0; int16_t sum = 0;
for (int i = 0; i < this->bufSize; i++) for (int i = 0; i < Speedometer::bufSize; i++)
{
sum += this->buf[i]; sum += this->buf[i];
return sum / this->bufSize; }
return sum / Speedometer::bufSize;
} }
+100 -131
View File
@@ -17,19 +17,7 @@
#include <iostream> #include <iostream>
#include "counter.h" #include "counter.h"
#include "component.h"
/**
* @brief The default size of numbers to be taken in account for the average.
*
*/
#define BUFSIZE 10
/**
* @brief Default value for min Millisseconds between each loop
* @see setDelay(uint8_t val)
*/
#define DELAY_SPEEDOMETER 30
#define PI 3.1415926535897932384626433832795
/** /**
* @brief A class which use a encoder to calc the speed * @brief A class which use a encoder to calc the speed
@@ -38,141 +26,122 @@
* The calculated speed is the average of an amount of last measurements. * The calculated speed is the average of an amount of last measurements.
* *
*/ */
class Speedometer { class Speedometer : public Component
public: {
/** public:
* @brief Enum to control the direction. /**
* * @brief Enum to control the direction.
* If the Direction is Forward, the internal counter counts up and a positiv speed will be returned. *
* If the Direction is Backward, the internal counter counts down and a negativ speed will be returned. * If the Direction is Forward, the internal counter counts up and a positiv speed will be returned.
* If the Dorection is None, no measurement will be taken. * If the Direction is Backward, the internal counter counts down and a negativ speed will be returned.
*/ * If the Direction is None, no measurement will be taken.
enum Direction { */
None, enum Direction
Forward, {
Backward None,
}; Forward,
Backward
};
/** /**
* @brief Construct a new Speedometer object * @brief Construct a new Speedometer object
* *
* @param pin Pin on the Esp from the encoder. * @param pin Pin on the Esp from the encoder.
* @param diameter Diameter of the wheel in meters. * @param diameter Diameter of the wheel in meters.
* @param steps Encodersteps for a complete wheel rotation. * @param steps EncoderSteps for a complete wheel rotation.
* @param numOfValForAvg Number of last values to be taken into account for the average. */
*/ Speedometer(uint8_t pin, double diameter, uint16_t steps);
Speedometer(uint8_t pin, double diameter, uint16_t steps, uint8_t numOfValForAvg);
Speedometer(uint8_t pin, double diameter, uint16_t steps);
~Speedometer(); ~Speedometer();
/** /**
* @brief Calls runSpeedometer() to update all Values. * @brief Set the direction
* *
* This function should be called every mainloop. If the delayLoop is not reached, than the * @param dir Direction
* functions returns immediately. */
* @see runSpeedometer() void setDirection(Direction dir);
* @see DELAY_SPEEDOMETER
* @return time since the last call in Milliseconds
*/
uint16_t loop();
/** /**
* @brief Normally called repeatedly by loop() to calculate new values. * @brief Set the Enc Filter to prevent bouncing
* *
* Add a new Value to the average and update the speed. * ignore pulses less than val x 2.5ns
*/ *
void runSpeedometer(); * @param val default = 1000, max = 1023
*/
void setEncFilter(uint16_t val);
/** /**
* @brief Set the direction * @brief Get the Direction
* *
* @param dir Direction * @return Direction
*/ */
void setDirection(Direction dir); Direction getDirection() const { return this->currentDirection; }
/** /**
* @brief Set the number of last values to be taken into account for the average. * @brief Get the calculated speed of the wheel
* *
* @param val length of the array * @return double speed in m/s
*/ */
void setNumOfValForAvg(uint8_t val); double getSpeed() const { return this->speed; }
/** /**
* @brief Set the Enc Filter to prevent bouncing * @brief Get the calculated speed of the wheel
* *
* ignore pulses less than val x 2.5ns * @return double speed in rad/s
* */
* @param val default = 1000, max = 1023 double getSpeedRad() const { return this->rad; };
*/
void setEncFilter(uint16_t val);
/** /**
* @brief Set the min delayLoop between each loop * @brief Get the calculated average speed of the wheel
* *
* @param delayLoop time in Milliseconds * @return double speed in m/s
*/ */
void setDelay(uint8_t delayLoop) { this->delayLoop = delayLoop; } double getAvgSpeed() const;
/** /**
* @brief Get the Direction * @brief Start calibration
* *
* @return Direction * This functions stops the loop. So that steps of one manual wheel turn
*/ * can measured. Call calibrationMeasurementStop to start the loop and get
Direction getDirection() { return this->currentDirection; } * the result.
*/
void calibrationMeasurementStart();
/** /**
* @brief Get the calculated speed of the Wheel * @brief Stop calibration
* *
* @return double speed in m/s * Start the loop function and read the past steps.
*/ *
double getSpeed() { return this->speed; } * @return uint16_t steps since calibrationMeasurementStart was called
*/
uint16_t calibrationMeasurementStop();
/** private:
* @brief Start calibration void run() override;
* void clearAvgBuf();
* This functions stops the loop. So that steps of one manual wheel turn void addValToBuf(int16_t val);
* can measured. Call calibrationMeasurementStop to start the loop and get int16_t calcAverage() const;
* the result.
*/
void calibrationMeasurementStart();
/** static constexpr uint8_t loopDelay = 30;
* @brief Stop calibration static constexpr uint8_t bufSize = 5;
* static constexpr uint8_t conversionFactor = 100;
* Start the loop function and read the past steps.
*
* @return uint16_t steps since calibrationMeasurementStart was called
*/
uint16_t calibrationMeasurementStop();
Counter *pulseCounter;
Direction currentDirection = Direction::None;
private: bool calibrationRunning = false;
void init(uint8_t pin, double diameter, uint16_t steps);
void initAvgBuf();
void clearAvgBuf();
void addValToBuf(int16_t val);
void updateAvgBufSize();
int16_t calcAverage();
Counter* pulseCounter; double speed = 0;
Direction currentDirection = Direction::None; double rad = 0;
double diameter;
bool calibrationRunning = false; uint8_t printCounter = 0;
uint8_t bufPos = 0;
uint16_t steps;
int16_t buf[Speedometer::bufSize];
uint32_t lastMillisCalc = 0;
double speed = 0; static constexpr uint16_t maxFilterValue = 1023;
double diameter;
uint8_t printCounter = 0;
uint8_t bufSize = BUFSIZE;
uint8_t delayLoop = DELAY_SPEEDOMETER;
uint8_t bufPos = 0;
uint16_t steps;
int16_t *buf = nullptr;
uint32_t lastMillisLoop = 0;
uint32_t lastMillisCalc = 0;
}; };
#endif // SPEEDOMETER_H #endif // SPEEDOMETER_H
+22 -11
View File
@@ -1,7 +1,7 @@
/** /**
* @file debugTimes.cpp * @file debugTimes.cpp
* @author Alexander Klein (alex@kleiax.de) * @author Alexander Klein (alex@kleiax.de)
* @brief Implemention of the class debugTimes.h. * @brief Implementation of the class debugTimes.h.
* @version 0.1 * @version 0.1
* @date 2021-12-13 * @date 2021-12-13
* *
@@ -13,33 +13,44 @@
bool DebugTimes::print = false; bool DebugTimes::print = false;
bool DebugTimes::printWarning = true; bool DebugTimes::printWarning = true;
DebugTimes::DebugTimes() { DebugTimes::DebugTimes()
this->startTime = millis(); : startTime{millis()}
{
if (DebugTimes::printWarning) { if (DebugTimes::printWarning)
std::cout << std::endl << "Warning: DebugTimes is muuted, no times are be shown." << std::endl << std::endl; {
std::cout << std::endl
<< "Warning: DebugTimes is muted, no times are be shown." << std::endl
<< std::endl;
DebugTimes::printWarning = false; DebugTimes::printWarning = false;
} }
} }
void DebugTimes::restart() { void DebugTimes::restart()
{
this->startTime = millis(); this->startTime = millis();
} }
uint16_t DebugTimes::stop() { const uint16_t DebugTimes::stop()
{
return millis() - this->startTime; return millis() - this->startTime;
} }
uint16_t DebugTimes::stopConsol(const char* name, uint16_t minTime) { const uint16_t DebugTimes::stopConsol(const char *name, uint16_t minTime)
uint64_t time = millis() - this->startTime; {
const uint64_t time = millis() - this->startTime;
if (time > minTime && DebugTimes::print) if (time > minTime && DebugTimes::print)
{
std::cout << name << " needs " << time << " ms" << std::endl; std::cout << name << " needs " << time << " ms" << std::endl;
}
return time; return time;
} }
void DebugTimes::setConsolOutput(bool enable) { void DebugTimes::setConsolOutput(bool enable)
{
if (enable == DebugTimes::print) if (enable == DebugTimes::print)
{
return; return;
}
DebugTimes::print = enable; DebugTimes::print = enable;
DebugTimes::printWarning = !enable; DebugTimes::printWarning = !enable;
+38 -37
View File
@@ -28,49 +28,50 @@
* @warning This class is not very accurate * @warning This class is not very accurate
* It only give you the time in milliseconds. * It only give you the time in milliseconds.
*/ */
class DebugTimes { class DebugTimes
public: {
/** public:
* @brief Construct a new Debug Times object /**
* Starts to count milliseconds * @brief Construct a new Debug Times object
*/ * Starts to count milliseconds
*/
DebugTimes(); DebugTimes();
/** /**
* @brief Set the counter to 0 * @brief Set the counter to 0
*/ */
void restart(); void restart();
/** /**
* @brief Give the elapsed time * @brief Give the elapsed time
* *
* @return uint16_t elapsed milliseconds * @return uint16_t elapsed milliseconds
*/ */
uint16_t stop(); const uint16_t stop();
/** /**
* @brief Print the elapsed time to consol * @brief Print the elapsed time to consol
* *
* @param name Functionname to print * @param name FunctionName to print
* @param minTime A minimum time before printing * @param minTime A minimum time before printing
* *
* @return uint16_t elapsed milliseconds * @return uint16_t elapsed milliseconds
*/ */
uint16_t stopConsol(const char* name, uint16_t minTime = 0); const uint16_t stopConsol(const char *name, uint16_t minTime = 0);
/** /**
* @brief Sets if the result should be printed. * @brief Sets if the result should be printed.
* *
* @param enable * @param enable
*/ */
static void setConsolOutput(bool enable); static void setConsolOutput(bool enable);
private: private:
uint64_t startTime; uint64_t startTime;
static bool print; static bool print;
static bool printWarning; static bool printWarning;
}; };
#endif //DEBUG_TIMES_H #endif // DEBUG_TIMES_H
+25 -12
View File
@@ -8,32 +8,45 @@
; Please visit documentation for the other options and examples ; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html ; https://docs.platformio.org/page/projectconf.html
[env] [env:embedded]
platform = espressif32 platform = espressif32
board = esp32doit-devkit-v1 board = esp32doit-devkit-v1
board_build.partitions = no_ota.csv board_build.partitions = no_ota.csv
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 921600 upload_speed = 921600
monitor_port = COM3 ; monitor_port = COM6
lib_deps = lib_deps =
sparkfun/SparkFun u-blox GNSS Arduino Library@^2.2.7 https://git.kleiax.de/PlatformIO-Libs/SparkFunGNSS.git
https://git.kleiax.de/PlatformIO-Libs/Menu.git
knolleary/PubSubClient@^2.8 knolleary/PubSubClient@^2.8
br3ttb/PID@^1.2.1 br3ttb/PID@^1.2.1
marcoschwartz/LiquidCrystal_I2C@^1.1.4 marcoschwartz/LiquidCrystal_I2C@^1.1.4
bblanchon/ArduinoJson@^6.20.0 bblanchon/ArduinoJson@^6.20.0
mprograms/QMC5883LCompass@^1.1.1 mprograms/QMC5883LCompass@^1.2.0
https://git.kleiax.de/PlatformIO-Libs/Menu.git#v1.0 jrowberg/I2Cdevlib-MPU6050@^1.0.0
nrf24/RF24@^1.4.5 ; upload_port = COM6
upload_port = COM3 test_ignore = test_desktop
[env:release]
build_type = release
[env:debug]
build_type = debug build_type = debug
monitor_filters = esp32_exception_decoder monitor_filters = esp32_exception_decoder
check_tool = clangtidy check_tool = clangtidy
check_flags =
clangtidy: --checks=-*,cert-*,cppcoreguidelines-*,clang-analyzer-*,google-*,hicpp-*,modernize-*,performance-*,portability-*,readability-*,bugprone-*,misc-*,openmp-*,objc-* --fix
check_src_filters =
+<src/*>
+<lib/*>
+<include/*>
[env:native]
platform = native
test_ignore = test_embedded
[platformio] [platformio]
description = A Rover who should be drive a route by gps. description = A Rover who should be drive a route by gps.
; Bei Möglichkeit folgendes aus clang tidy entfernen
; cppcoreguidelines-owning-memory
;
;
;
+38 -21
View File
@@ -1,5 +1,5 @@
/** /**
* @file outputBufMqtt.cpp * @file outputBuf.cpp
* @author Alexander Klein (alex@kleiax.de) * @author Alexander Klein (alex@kleiax.de)
* @brief Contains the implementation of the class OutputBufMqtt * @brief Contains the implementation of the class OutputBufMqtt
* @version 0.1 * @version 0.1
@@ -11,49 +11,66 @@
#include "OutputBuf/outputBuf.h" #include "OutputBuf/outputBuf.h"
OutputBuf::OutputBuf(DebugMqtt* debugMqtt, BluetoothSerial* serialBT) OutputBuf::OutputBuf(DebugMqtt *debugMqtt, BluetoothSerial *serialBT)
: std::streambuf() { : debugMqtt{debugMqtt}, serialBT{serialBT}
this->debugMqtt = debugMqtt; {
this->serialBT = serialBT; if (static_cast<bool>(debugMqtt))
{
if (debugMqtt)
this->isMqttActive = true; this->isMqttActive = true;
}
if (serialBT) if (static_cast<bool>(serialBT))
{
this->isMqttActive = true; this->isMqttActive = true;
}
} }
void OutputBuf::activateMqtt(bool status) { void OutputBuf::activateMqtt(bool status)
if (debugMqtt) {
if (static_cast<bool>(debugMqtt))
{
this->isMqttActive = status; this->isMqttActive = status;
}
} }
void OutputBuf::activateSerialBT(bool status) { void OutputBuf::activateSerialBT(bool status)
if (serialBT) {
if (static_cast<bool>(serialBT))
{
this->isSerialBTActive = status; this->isSerialBTActive = status;
}
} }
void OutputBuf::setDebugMqtt(DebugMqtt* debugMqtt) { void OutputBuf::setDebugMqtt(DebugMqtt *debugMqtt)
{
this->debugMqtt = debugMqtt; this->debugMqtt = debugMqtt;
this->isMqttActive = true; this->isMqttActive = true;
} }
void OutputBuf::setSerialBT(BluetoothSerial* serialBT) { void OutputBuf::setSerialBT(BluetoothSerial *serialBT)
{
this->serialBT = serialBT; this->serialBT = serialBT;
this->isSerialBTActive = true;; this->isSerialBTActive = true;
;
} }
std::streambuf::int_type OutputBuf::overflow(std::streambuf::int_type c) { std::streambuf::int_type OutputBuf::overflow(std::streambuf::int_type character)
if (c != EOF) { {
if (character != EOF)
{
// c = std::toupper(static_cast<char>(c), getloc()); // c = std::toupper(static_cast<char>(c), getloc());
if (this->debugMqtt && this->isMqttActive) if (this->debugMqtt && this->isMqttActive)
this->debugMqtt->addCharacter((char) c); {
this->debugMqtt->addCharacter(static_cast<char>(character));
}
if (this->serialBT && this->isSerialBTActive && this->serialBT->connected()) if (this->serialBT && this->isSerialBTActive && this->serialBT->connected())
this->serialBT->print((char) c); {
this->serialBT->print(static_cast<char>(character));
}
Serial.print((char) c); Serial.print(static_cast<char>(character));
} }
return c; return character;
} }
+45 -44
View File
@@ -1,5 +1,5 @@
/** /**
* @file outputBufMqtt.h * @file outputBuf.h
* @author Alexander Klein (alex@kleiax.de) * @author Alexander Klein (alex@kleiax.de)
* @brief Contains a small class that provide a streambuf * @brief Contains a small class that provide a streambuf
* *
@@ -26,60 +26,61 @@
#include <BluetoothSerial.h> #include <BluetoothSerial.h>
/** /**
* @brief A alternativ streambuf for std::cout * @brief A alternative streambuf for std::cout
* *
* The streambuf is used to double the std::cout to consol * The streambuf is used to double the std::cout to consol
* and MQTT. * and MQTT.
* *
*/ */
class OutputBuf : public std::streambuf { class OutputBuf : public std::streambuf
public: {
/** public:
* @brief Construct a new Output Buf Mqtt object /**
* * @brief Construct a new Output Buf Mqtt object
* @param debugMqtt *
*/ * @param debugMqtt
OutputBuf(DebugMqtt* debugMqtt = nullptr, BluetoothSerial* serialBT = nullptr); * @param serialBT
*/
OutputBuf(DebugMqtt *debugMqtt = nullptr, BluetoothSerial *serialBT = nullptr);
/** /**
* @brief Activate the mqtt output * @brief Activate the mqtt output
* *
* This only works if the DebugMqtt is set by * This only works if the DebugMqtt is set by
* setDebugMqtt. * setDebugMqtt().
* *
* @param status * @param status
*/ */
void activateMqtt(bool status); void activateMqtt(bool status);
/** /**
* @brief Active the output over the bluetooth serial consol * @brief Active the output over the bluetooth serial consol
* *
* This only works if BluetoothSerial is set by * This only works if BluetoothSerial is set by
* setSerialBT. * setSerialBT().
* *
* @param status * @param status
*/ */
void activateSerialBT(bool status); void activateSerialBT(bool status);
void setDebugMqtt(DebugMqtt* debugMqtt); void setDebugMqtt(DebugMqtt *debugMqtt);
void setSerialBT(BluetoothSerial* serialBT); void setSerialBT(BluetoothSerial *serialBT);
protected:
/**
* @brief
*
* @param c
* @return std::streambuf::int_type
*/
virtual std::streambuf::int_type overflow(std::streambuf::int_type c);
protected: private:
/** bool isMqttActive = false;
* @brief bool isSerialBTActive = false;
*
* @param c
* @return std::streambuf::int_type
*/
virtual std::streambuf::int_type overflow(std::streambuf::int_type c);
private: DebugMqtt *debugMqtt;
bool isMqttActive = false; BluetoothSerial *serialBT;
bool isSerialBTActive = false;
DebugMqtt* debugMqtt;
BluetoothSerial* serialBT;
}; };
#endif // OUTPUT_STREAM_MQTT_H #endif // OUTPUT_STREAM_MQTT_H
@@ -0,0 +1,70 @@
/**
* @file menuCalibrateBattery.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-26
*
* @copyright Copyright (c) 2023
*
*/
#include "menuCalibrateBattery.h"
MenuCalibrateBattery::MenuCalibrateBattery(Battery *battery)
: battery{battery}
{
this->setUpdateDelay(MenuCalibrateBattery::updateDelay);
}
void MenuCalibrateBattery::printMenu()
{
if (this->battery->getCalibrationState() == Battery::CalibrationState::None)
{
this->battery->startCalibration();
}
String lineOne = "";
String lineTwo = "";
switch (this->battery->getCalibrationState())
{
case Battery::CalibrationState::Waiting:
lineOne = "Target Voltage:";
lineTwo = "7 + ";
lineTwo.concat(this->battery->getCurrentCalibrationVoltage());
lineTwo.concat(" / 10");
break;
case Battery::CalibrationState::Reading:
lineOne = "Reading...";
break;
case Battery::CalibrationState::Finished:
lineOne = "Finished!";
break;
default:
break;
}
this->print(lineOne, lineTwo);
}
void MenuCalibrateBattery::left()
{
this->battery->finishCalibration();
if (static_cast<bool>(parentMenu))
{
this->parentMenu->printMenu();
}
}
void MenuCalibrateBattery::right()
{
if (this->battery->getCalibrationState() == Battery::CalibrationState::Waiting)
{
this->battery->nextVoltageIsReady();
}
}
@@ -0,0 +1,50 @@
/**
* @file menuCalibrateBattery.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a Menu class to calibrate the Battery class
* @version 0.1
* @date 2023-09-26
*
* @copyright Copyright (c) 2023
*
*/
#ifndef MENU_CALIBRATE_BATTERY_H
#define MENU_CALIBRATE_BATTERY_H
#include "menuControl.h"
#include "battery.h"
/**
* @brief A Menu class to calibrate the Battery class
*/
class MenuCalibrateBattery : public MenuControl
{
public:
/**
* @brief Construct a new MenuCalibrateBattery object
*
* Prepare the calibration.
*
* @param battery
*/
MenuCalibrateBattery(Battery *battery);
/**
* @brief Prints the instructions for the calibration
*/
void printMenu() override;
// User Inputs
void left() override;
void no() override { this->left(); }
void right() override;
void yes() override { this->right(); }
private:
Battery *battery;
static constexpr uint16_t updateDelay = 400;
};
#endif // MENU_CALIBRATE_BATTERY_H
-121
View File
@@ -1,121 +0,0 @@
/**
* @file menuGPS.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains an implementation of the class MenuGPS
* @version 0.1
* @date 2022-01-29
*
* @copyright Copyright (c) 2022
*
*/
#include "menuGPS.h"
MenuGPS::MenuGPS(DriveManager* driveManager) :
MenuInformationSites(10) {
this->navigation = driveManager->getNavigation();
this->ntripClient = this->navigation->getNTRIPClient();
}
void MenuGPS::printPage() const {
UBX_NAV_PVT_data_t* gpsData = this->navigation->getUbxData();
uint8_t fixType = 0;
if (gpsData)
fixType = gpsData->fixType;
String lineOne = "Data isn't valid";
String lineTwo = "or no GPS signal";
switch (this->getCurrentPage()) {
case 0:
if (fixType) {
lineOne = "Sats: ";
lineOne.concat(gpsData->numSV);
lineTwo = "PDOP: ";
lineTwo.concat(gpsData->pDOP);
}
break;
case 1:
if (fixType) {
lineOne = "Lat: ";
lineOne.concat(gpsData->lat);
lineTwo = "Lon: ";
lineTwo.concat(gpsData->lon);
}
break;
case 2:
lineOne = "Time: ";
lineTwo = "";
if (fixType) {
lineTwo.concat(gpsData->hour);
lineTwo.concat(":");
lineTwo.concat(gpsData->min);
lineTwo.concat(":");
lineTwo.concat(gpsData->sec);
} else
lineTwo = "00:00:00";
break;
case 3: {
NTRIPClientStates status = this->ntripClient->getClientState();
lineOne = "NTRIP Client is";
if (status == NTRIPClientStates::pushData)
lineTwo = "enabled";
else if (status == NTRIPClientStates::notAvailable)
lineTwo = "not available";
else
lineTwo = "disabled";
}
break;
case 4:
lineOne = "Hrizntl Accuracy";
if (fixType) {
lineTwo = "";
lineTwo.concat(gpsData->hAcc);
} else
lineTwo = "0";
break;
case 5:
lineOne = "magDec: ";
lineTwo = "magAcc: ";
if (fixType) {
lineOne.concat(gpsData->magDec);
lineTwo.concat(gpsData->magAcc);
} else {
lineOne.concat("---");
lineTwo.concat("---");
}
break;
case 6:
lineOne = "Azimuth: ";
lineTwo = "";
lineTwo.concat(this->navigation->getAzimuth());
break;
default:
this->printDefault();
return;
}
this->print(lineOne, lineTwo);
}
void MenuGPS::runCommand() const {
switch (this->getCurrentPage()) {
case 3: {
// std::cout << "MenuGPS::runCommand " << this->ntripClient->getClientState() << std::endl;
if (this->ntripClient->getClientState() == NTRIPClientStates::pushData)
this->ntripClient->setActivated(false);
else if (this->ntripClient->getClientState() != NTRIPClientStates::notAvailable)
this->ntripClient->setActivated(true);
break;
}
}
}
-43
View File
@@ -1,43 +0,0 @@
/**
* @file menuGPS.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a class to print informations about the GPS object
* @version 0.1
* @date 2022-01-29
*
* @copyright Copyright (c) 2022
*
*/
#ifndef MENU_GPS_H
#define MENU_GPS_H
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
#include "menuInformationSites.h"
#include "driveModi/driveManager.h"
#include "navigation.h"
#include "ntripClient.h"
/**
* @brief A class to print informations about the GPS object
*
*/
class MenuGPS : public MenuInformationSites {
public:
/**
* @brief Construct a new Menu GPS object
*
* @param gps
*/
MenuGPS(DriveManager* driveManager);
private:
void printPage() const override;
void runCommand() const override;
NTRIPClient* ntripClient;
Navigation* navigation;
};
#endif // MENU_GPS_H
+5 -4
View File
@@ -11,12 +11,13 @@
#include "menuPidSettings.h" #include "menuPidSettings.h"
MenuPidSettings::MenuPidSettings(PID* pid) { MenuPidSettings::MenuPidSettings(PID *pid) : pid{pid} {}
this->pid = pid;
}
void MenuPidSettings::action(int16_t* values, uint8_t length) { void MenuPidSettings::action(int16_t *values, uint8_t length)
{
if (length != 3) if (length != 3)
{
return; return;
}
this->pid->SetTunings(values[0], values[1], values[2]); this->pid->SetTunings(values[0], values[1], values[2]);
} }
+12 -12
View File
@@ -20,20 +20,20 @@
* @brief A class to tune the PID settings * @brief A class to tune the PID settings
* *
*/ */
class MenuPidSettings : public MenuIntInputWrapper { class MenuPidSettings : public MenuIntInputWrapper
public: {
/** public:
* @brief Construct a new Menu Pid Settings object /**
* * @brief Construct a new Menu Pid Settings object
* @param pid *
*/ * @param pid
MenuPidSettings(PID* pid); */
MenuPidSettings(PID *pid);
void action(int16_t* values, uint8_t length); void action(int16_t *values, uint8_t length) override;
private:
PID* pid;
private:
PID *pid;
}; };
#endif // PID_SETTINGS_H #endif // PID_SETTINGS_H
+176 -65
View File
@@ -11,26 +11,33 @@
#include "menuRoute.h" #include "menuRoute.h"
MenuActionRoute::MenuActionRoute(MenuRoute* menuRoute, DataFunction dataFunction) { MenuActionRoute::MenuActionRoute(MenuRoute *menuRoute, DataFunction dataFunction)
this->menuRoute = menuRoute; : menuRoute{menuRoute}, dataFunction{dataFunction}
this->dataFunction = dataFunction; {
} }
void MenuActionRoute::action() { void MenuActionRoute::action()
{
(this->menuRoute->*this->dataFunction)(0); (this->menuRoute->*this->dataFunction)(0);
} }
MenuRoute::MenuRoute(Route* route) { MenuRoute::MenuRoute(Route *route)
this->route = route; : route{route}
{
} }
MenuRoute::~MenuRoute() { MenuRoute::~MenuRoute()
{
if (isInit) if (isInit)
{
delete this->mainMenu; delete this->mainMenu;
}
} }
void MenuRoute::printMenu() { void MenuRoute::printMenu()
if (!this->isInit) { {
if (!this->isInit)
{
this->isInit = true; this->isInit = true;
this->init(); this->init();
} }
@@ -38,93 +45,122 @@ void MenuRoute::printMenu() {
this->mainMenu->printMenu(); this->mainMenu->printMenu();
} }
void MenuRoute::down()
void MenuRoute::down() { {
if (blockInput) return; if (blockInput)
{
return;
}
this->mainMenu->down(); this->mainMenu->down();
} }
void MenuRoute::up() { void MenuRoute::up()
if (blockInput) return; {
if (blockInput)
{
return;
}
this->mainMenu->up(); this->mainMenu->up();
} }
void MenuRoute::right() { void MenuRoute::right()
if (blockInput) return; {
if (blockInput)
{
return;
}
this->mainMenu->right(); this->mainMenu->right();
} }
void MenuRoute::left() { void MenuRoute::left()
if (blockInput) return; {
if (blockInput)
{
return;
}
if (this->mainMenu->isInSubmenu()) if (this->mainMenu->isInSubmenu())
{
this->mainMenu->left(); this->mainMenu->left();
}
else else
{
this->parentMenu->printMenu(); this->parentMenu->printMenu();
}
} }
void MenuRoute::yes() { void MenuRoute::yes()
if (blockInput) return; {
if (blockInput)
{
return;
}
this->mainMenu->yes(); this->mainMenu->yes();
} }
void MenuRoute::no() { void MenuRoute::no()
if (blockInput) return; {
if (blockInput)
{
return;
}
if (this->mainMenu->isInSubmenu()) if (this->mainMenu->isInSubmenu())
{
this->mainMenu->no(); this->mainMenu->no();
}
else else
{
this->left(); this->left();
}
} }
void MenuRoute::init()
void MenuRoute::init() { {
// auto dummy = []() { // auto dummy = []() {
// std::cout << "Dummy in Action" <<std::endl; // std::cout << "Dummy in Action" <<std::endl;
// }; // };
this->mainMenu = new Menu; this->mainMenu = new Menu;
MenuRoutePoints* pointsMenu = new MenuRoutePoints(this->route); auto *pointsMenu = new MenuRoutePoints(this->route);
Menu* importMenu = new Menu;
Menu* exportMenu = new Menu;
Menu* clearMenu = new Menu;
this->mainMenu->setLcd(this->lcd); this->mainMenu->setLcd(this->lcd);
pointsMenu->setLcd(this->lcd); pointsMenu->setLcd(this->lcd);
importMenu->setLcd(this->lcd);
exportMenu->setLcd(this->lcd);
clearMenu->setLcd(this->lcd);
MenuIntInput* importWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::importRoute)); auto *importWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::importRoute));
MenuIntInput* exportWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::exportRoute)); auto *exportWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::exportRoute));
MenuActionRoute* clearWrapper = new MenuActionRoute(this, &MenuRoute::clearRoute); auto *deleteWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::deleteRoute));
auto *clearWrapper = new MenuActionRoute(this, &MenuRoute::clearRoute);
importWrapper->setLcd(this->lcd); importWrapper->setLcd(this->lcd);
importWrapper->setMinMax(0, 100); importWrapper->setMinMax(0, MenuRoute::maxRouteNumber);
importWrapper->setPrintParentMenu(false); importWrapper->setPrintParentMenu(false);
importWrapper->setEntry(0, "Import Route"); importWrapper->setEntry(0, "Import Route");
exportWrapper->setLcd(this->lcd); exportWrapper->setLcd(this->lcd);
exportWrapper->setMinMax(0, 100); exportWrapper->setMinMax(0, MenuRoute::maxRouteNumber);
exportWrapper->setPrintParentMenu(false); exportWrapper->setPrintParentMenu(false);
exportWrapper->setEntry(0, "Export Route"); exportWrapper->setEntry(0, "Export Route");
MenuAction* pointsAction = new MenuAction("Points", pointsMenu); deleteWrapper->setLcd(this->lcd);
MenuAction* importAction = new MenuAction("Import", importWrapper); deleteWrapper->setMinMax(0, MenuRoute::maxRouteNumber);
MenuAction* exportAction = new MenuAction("Export", exportWrapper); deleteWrapper->setPrintParentMenu(false);
MenuAction* clearAction = new MenuAction("Clear", clearWrapper); deleteWrapper->setEntry(0, "Delete Route");
this->mainMenu->addEntry(pointsAction); this->mainMenu->addEntry(new MenuAction("Points", pointsMenu));
this->mainMenu->addEntry(importAction); this->mainMenu->addEntry(new MenuAction("Clear", clearWrapper));
this->mainMenu->addEntry(exportAction); this->mainMenu->addEntry(new MenuAction("Import", importWrapper));
this->mainMenu->addEntry(clearAction); this->mainMenu->addEntry(new MenuAction("Export", exportWrapper));
this->mainMenu->addEntry(new MenuAction("Delete", deleteWrapper));
} }
void MenuRoute::importRoute(uint8_t routeNumber) { void MenuRoute::importRoute(uint8_t routeNumber)
{
this->blockInput = true; this->blockInput = true;
String lineOne = ""; String lineOne = "";
String lineTwo = ""; String lineTwo = "";
if (WiFi.status() != WL_CONNECTED) { if (WiFi.status() != WL_CONNECTED)
{
lineOne = "Not connected to"; lineOne = "Not connected to";
lineTwo = "the WiFi."; lineTwo = "the WiFi.";
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
@@ -132,7 +168,8 @@ void MenuRoute::importRoute(uint8_t routeNumber) {
return; return;
} }
if (ESP.getMaxAllocHeap() < JSON_DOCUMENT_SIZE_ROUTE) { if (ESP.getMaxAllocHeap() < JSON_DOCUMENT_SIZE_ROUTE)
{
lineOne = "Not enough mem"; lineOne = "Not enough mem";
lineTwo = "for Json obj"; lineTwo = "for Json obj";
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
@@ -147,20 +184,25 @@ void MenuRoute::importRoute(uint8_t routeNumber) {
String host = "http://rover.kleiax.de/api/"; String host = "http://rover.kleiax.de/api/";
host.concat(routeNumber); host.concat(routeNumber);
http.begin(client, host); http.begin(client, host);
int httpResponseCode = http.GET(); const int httpResponseCode = http.GET();
lineOne = "Import complete"; lineOne = "Import complete";
lineTwo = "Code: "; lineTwo = "Code: ";
if (httpResponseCode == 202) if (httpResponseCode == MenuRoute::httpValidImport)
{
deserializeJson(doc, http.getStream()); deserializeJson(doc, http.getStream());
}
else else
{
lineOne = "HTTP Error"; lineOne = "HTTP Error";
}
lineTwo.concat(httpResponseCode); lineTwo.concat(httpResponseCode);
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
if (httpResponseCode <= 0) { if (httpResponseCode <= 0)
{
this->blockInput = false; this->blockInput = false;
return; return;
} }
@@ -168,7 +210,8 @@ void MenuRoute::importRoute(uint8_t routeNumber) {
uint16_t totalPoints = doc["amountPoints"]; uint16_t totalPoints = doc["amountPoints"];
this->route->clear(); this->route->clear();
for (uint16_t i = 0; i < totalPoints; i++) { for (uint16_t i = 0; i < totalPoints; i++)
{
Point::Coordinates coords; Point::Coordinates coords;
coords.lat = doc["points"][i][0].as<double>(); coords.lat = doc["points"][i][0].as<double>();
coords.lon = doc["points"][i][1].as<double>(); coords.lon = doc["points"][i][1].as<double>();
@@ -179,14 +222,16 @@ void MenuRoute::importRoute(uint8_t routeNumber) {
http.end(); http.end();
} }
void MenuRoute::exportRoute(uint8_t routeNumber) { void MenuRoute::exportRoute(uint8_t routeNumber)
{
this->blockInput = true; this->blockInput = true;
uint16_t totalPoints = this->route->getRouteInfo().totalPoints; uint16_t totalPoints = this->route->getRouteInfo().totalPoints;
String lineOne = ""; String lineOne = "";
String lineTwo = ""; String lineTwo = "";
if (WiFi.status() != WL_CONNECTED) { if (WiFiSTAClass::status() != WL_CONNECTED)
{
lineOne = "Not connected to"; lineOne = "Not connected to";
lineTwo = "the WiFi."; lineTwo = "the WiFi.";
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
@@ -194,7 +239,8 @@ void MenuRoute::exportRoute(uint8_t routeNumber) {
return; return;
} }
if (ESP.getMaxAllocHeap() < JSON_DOCUMENT_SIZE_ROUTE) { if (ESP.getMaxAllocHeap() < JSON_DOCUMENT_SIZE_ROUTE)
{
lineOne = "Not enough mem"; lineOne = "Not enough mem";
lineTwo = "for Json obj"; lineTwo = "for Json obj";
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
@@ -209,7 +255,8 @@ void MenuRoute::exportRoute(uint8_t routeNumber) {
Point::Coordinates coords = this->route->startRoute().getCoordinates(); Point::Coordinates coords = this->route->startRoute().getCoordinates();
doc["points"][0][0] = coords.lat; doc["points"][0][0] = coords.lat;
doc["points"][0][1] = coords.lon; doc["points"][0][1] = coords.lon;
for (uint16_t i = 1; i < totalPoints; i++) { for (uint16_t i = 1; i < totalPoints; i++)
{
coords = this->route->getNextPoint().getCoordinates(); coords = this->route->getNextPoint().getCoordinates();
doc["points"][i][0] = coords.lat; doc["points"][i][0] = coords.lat;
doc["points"][i][1] = coords.lon; doc["points"][i][1] = coords.lon;
@@ -222,12 +269,16 @@ void MenuRoute::exportRoute(uint8_t routeNumber) {
http.begin(client, "http://rover.kleiax.de/api/"); http.begin(client, "http://rover.kleiax.de/api/");
http.addHeader("Content-Type", "application/json"); http.addHeader("Content-Type", "application/json");
int httpResponseCode = http.POST(jsonData); const int httpResponseCode = http.POST(jsonData);
if (httpResponseCode == 201) if (httpResponseCode == MenuRoute::httpValidExport)
{
lineOne = "Export complete"; lineOne = "Export complete";
}
else else
{
lineOne = "HTTP Error"; lineOne = "HTTP Error";
}
lineTwo = "Code: "; lineTwo = "Code: ";
lineTwo.concat(httpResponseCode); lineTwo.concat(httpResponseCode);
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
@@ -236,29 +287,89 @@ void MenuRoute::exportRoute(uint8_t routeNumber) {
http.end(); http.end();
} }
void MenuRoute::clearRoute(uint8_t none) { void MenuRoute::deleteRoute(uint8_t routeNumber)
{
this->blockInput = true;
String lineOne = "";
String lineTwo = "";
if (WiFiSTAClass::status() != WL_CONNECTED)
{
lineOne = "Not connected to";
lineTwo = "the WiFi.";
this->print(lineOne, lineTwo);
this->blockInput = false;
return;
}
if (ESP.getMaxAllocHeap() < JSON_DOCUMENT_SIZE_ROUTE)
{
lineOne = "Not enough mem";
lineTwo = "for Json obj";
this->print(lineOne, lineTwo);
this->blockInput = false;
return;
}
WiFiClient client;
HTTPClient http;
DynamicJsonDocument doc(JSON_DOCUMENT_SIZE_ROUTE);
String host = "http://rover.kleiax.de/api/";
host.concat(routeNumber);
http.begin(client, host);
const int httpResponseCode = http.sendRequest("DELETE");
lineOne = "Delete complete";
lineTwo = "Code: ";
if (httpResponseCode == MenuRoute::httpValidDelete)
{
deserializeJson(doc, http.getStream());
}
else
{
lineOne = "HTTP Error";
}
lineTwo.concat(httpResponseCode);
this->print(lineOne, lineTwo);
this->blockInput = false;
http.end();
}
void MenuRoute::clearRoute(uint8_t none)
{
// The parameter exist only for compability
none;
this->route->clear(); this->route->clear();
this->print("Currente route", "deleted..."); this->print("Currente route", "deleted...");
} }
MenuRouteWrapper::MenuRouteWrapper(MenuRoute* menuRoute, DataFunction dataFunction) { MenuRouteWrapper::MenuRouteWrapper(MenuRoute *menuRoute, DataFunction dataFunction)
this->menuRoute = menuRoute; : menuRoute{menuRoute}, dataFunction{dataFunction}
this->dataFunction = dataFunction; {
} }
void MenuRouteWrapper::action(int16_t* values, uint8_t length) { void MenuRouteWrapper::action(int16_t *values, uint8_t length)
if (length < 1) { {
if (length < 1)
{
std::cout << "Error in MenuRouteWrapper::action" << std::endl; std::cout << "Error in MenuRouteWrapper::action" << std::endl;
return; return;
} }
if (values[0] < 0) if (values[0] < 0)
{
values[0] = 0; values[0] = 0;
}
if (values[0] > UINT8_MAX) if (values[0] > UINT8_MAX)
{
values[0] = UINT8_MAX; values[0] = UINT8_MAX;
}
(this->menuRoute->*this->dataFunction)(values[0]); (this->menuRoute->*this->dataFunction)(values[0]);
} }
+109 -92
View File
@@ -34,24 +34,25 @@ typedef void (MenuRoute::*DataFunction)(uint8_t);
* This class should be used to call importRoute, * This class should be used to call importRoute,
* exportRoute and clearRoute over the Menu. * exportRoute and clearRoute over the Menu.
*/ */
class MenuActionRoute : public MenuActionWrapper { class MenuActionRoute : public MenuActionWrapper
public: {
/** public:
* @brief Construct a new Menu Action Route object /**
* * @brief Construct a new Menu Action Route object
* @param menuRoute *
* @param dataFunction like exportRoute * @param menuRoute
*/ * @param dataFunction like exportRoute
MenuActionRoute(MenuRoute* menuRoute, DataFunction dataFunction); */
MenuActionRoute(MenuRoute *menuRoute, DataFunction dataFunction);
/** /**
* @brief Runs the given DataFunction * @brief Runs the given DataFunction
*/ */
void action() override; void action() override;
private: private:
MenuRoute* menuRoute; MenuRoute *menuRoute;
DataFunction dataFunction; DataFunction dataFunction;
}; };
/** /**
@@ -59,98 +60,114 @@ class MenuActionRoute : public MenuActionWrapper {
* *
* With this menu the user can import, export and delete routes. * With this menu the user can import, export and delete routes.
*/ */
class MenuRoute : public MenuControl { class MenuRoute : public MenuControl
public: {
/** public:
* @brief Construct a new Menu Route object /**
* * @brief Construct a new Menu Route object
* @param route *
*/ * @param route
MenuRoute(Route* route); */
~MenuRoute(); MenuRoute(Route *route);
~MenuRoute();
/** /**
* @brief Prints the last informations * @brief Prints the last informations
* *
* On first call this function calls the init function. * On first call this function calls the init function.
* On every call this functions call the printMenu function from * On every call this functions call the printMenu function from
* the mainMenu of this class. * the mainMenu of this class.
*/ */
void printMenu() override; void printMenu() override;
/** /**
* @name User Inputs * @name User Inputs
* @brief Inputs given by the parentMenu * @brief Inputs given by the parentMenu
*/ */
///@{ ///@{
void down() override; void down() override;
void up() override; void up() override;
void right() override; void right() override;
void left() override; void left() override;
void yes() override; void yes() override;
void no() override; void no() override;
///@} ///@}
/** /**
* @brief Import a Route. * @brief Import a Route.
* *
* The functions tries to pull the given route id from the RoverApi. * The functions tries to pull the given route id from the RoverApi.
* *
* @param routeNumber id * @param routeNumber id
*/ */
void importRoute(uint8_t routeNumber); void importRoute(uint8_t routeNumber);
/** /**
* @brief Export a Route. * @brief Export a Route.
* *
* The functions tries to push the current route to the RoverApi. * The functions tries to push the current route to the RoverApi.
* *
* @param routeNumber id * @param routeNumber id
*/ */
void exportRoute(uint8_t routeNumber); void exportRoute(uint8_t routeNumber);
/** /**
* @brief Delete the current Route. * @brief Delete a Route
* *
* @param none this param is not be used. * The functions tries to delete the current route from the RoverApi.
*/ *
void clearRoute(uint8_t none); * @param routeNumber
*/
void deleteRoute(uint8_t routeNumber);
private: /**
void init(); * @brief Delete the current Route.
*
* @param none this param is not be used.
*/
void clearRoute(uint8_t none);
Route* route; private:
Menu* mainMenu; void init();
bool isInit = false; Route *route;
bool blockInput = false; Menu *mainMenu = nullptr;
bool isInit = false;
bool blockInput = false;
static constexpr uint8_t maxRouteNumber = 100;
static constexpr uint16_t httpValidExport = 201;
static constexpr uint16_t httpValidImport = 202;
static constexpr uint16_t httpValidDelete = 202;
}; };
/** /**
* @brief MenuRouteWrapper to call DataFunctions with numeric user input * @brief MenuRouteWrapper to call DataFunctions with numeric user input
* *
*/ */
class MenuRouteWrapper : public MenuIntInputWrapper { class MenuRouteWrapper : public MenuIntInputWrapper
public: {
/** public:
* @brief Construct a new Menu Route Wrapper object. /**
* * @brief Construct a new Menu Route Wrapper object.
* @param menuRoute *
* @param dataFunction * @param menuRoute
*/ * @param dataFunction
MenuRouteWrapper(MenuRoute* menuRoute, DataFunction dataFunction); */
MenuRouteWrapper(MenuRoute *menuRoute, DataFunction dataFunction);
/** /**
* @brief Calls the given DataFunction. * @brief Calls the given DataFunction.
* *
* @param values The value to be given to the DataFunction. * @param values The value to be given to the DataFunction.
* @param length Number of values, should be 1. * @param length Number of values, should be 1.
*/ */
void action(int16_t* values, uint8_t length) override; void action(int16_t *values, uint8_t length) override;
private: private:
MenuRoute* menuRoute; MenuRoute *menuRoute;
DataFunction dataFunction = nullptr; DataFunction dataFunction = nullptr;
}; };
#endif // MENU_ROUTE_H #endif // MENU_ROUTE_H
+42 -17
View File
@@ -11,27 +11,41 @@
#include "menuRoutePoints.h" #include "menuRoutePoints.h"
MenuRoutePoints::MenuRoutePoints(Route *route) : MenuInformationSites() { MenuRoutePoints::MenuRoutePoints(Route *route)
this->route = route; : route{route}
{
} }
void MenuRoutePoints::init() { void MenuRoutePoints::init()
uint16_t amountPoints = this->route->getRouteInfo().totalPoints; {
const uint16_t amountPoints = this->route->getRouteInfo().totalPoints;
if (amountPoints > UINT8_MAX) if (amountPoints > UINT8_MAX)
{
this->error = true; this->error = true;
}
else else
{
this->setCountPages(amountPoints); this->setCountPages(amountPoints);
}
} }
void MenuRoutePoints::printPage() const { void MenuRoutePoints::printPage() const
uint8_t currentPage = this->getCurrentPage(); {
static constexpr int8_t width = 9;
static constexpr int8_t prec = 7;
static constexpr int8_t bufSize = 20;
const uint8_t currentPage = this->getCurrentPage();
if (this->lastPageNumber == currentPage) if (this->lastPageNumber == currentPage)
{
return; return;
}
String lineOne = "N "; String lineOne = "N ";
String lineTwo = "E "; String lineTwo = "E ";
if (this->error) { if (this->error)
{
lineOne = "Error: To much"; lineOne = "Error: To much";
lineTwo = "points are given"; lineTwo = "points are given";
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
@@ -39,35 +53,46 @@ void MenuRoutePoints::printPage() const {
} }
RouteInfo info = this->route->getRouteInfo(); RouteInfo info = this->route->getRouteInfo();
if (info.totalPoints == 0) { if (info.totalPoints == 0)
{
lineOne = "No Points are"; lineOne = "No Points are";
lineTwo = "available"; lineTwo = "available";
this->print(lineOne, lineTwo); this->print(lineOne, lineTwo);
return; return;
} }
Point p; Point point;
if (currentPage == 0) if (currentPage == 0)
p = this->route->startRoute(); {
point = this->route->startRoute();
}
else if (this->lastPageNumber - 1 == currentPage) else if (this->lastPageNumber - 1 == currentPage)
p = this->route->getPreviousPoint(); {
point = this->route->getPreviousPoint();
}
else if (this->lastPageNumber + 1 == currentPage) else if (this->lastPageNumber + 1 == currentPage)
p = this->route->getNextPoint(); {
point = this->route->getNextPoint();
}
else if (currentPage == this->getCountPages() - 1) else if (currentPage == this->getCountPages() - 1)
p = this->route->endRoute(); {
point = this->route->endRoute();
}
else else
{
std::cout << "Error in: MenuRoutePoints::printPage()" << std::endl; std::cout << "Error in: MenuRoutePoints::printPage()" << std::endl;
}
char buf[20]; char buf[bufSize];
char* string; char *string;
info = this->route->getRouteInfo(); info = this->route->getRouteInfo();
string = dtostrf(p.getLatitude(), 9, 7, buf); string = dtostrf(point.getLatitude(), width, prec, static_cast<char *>(buf));
lineOne.concat(string); lineOne.concat(string);
lineOne.concat(" "); lineOne.concat(" ");
lineOne.concat(info.currentPoint); lineOne.concat(info.currentPoint);
// lineOne.concat(currentPage); // lineOne.concat(currentPage);
string = dtostrf(p.getLongitude(), 9, 7, buf); string = dtostrf(point.getLongitude(), width, prec, static_cast<char *>(buf));
lineTwo.concat(string); lineTwo.concat(string);
lineTwo.concat(" "); lineTwo.concat(" ");
lineTwo.concat(info.totalPoints); lineTwo.concat(info.totalPoints);
+22 -22
View File
@@ -20,31 +20,31 @@
* @brief Prints coordinates of Route side by side. * @brief Prints coordinates of Route side by side.
* *
*/ */
class MenuRoutePoints : public MenuInformationSites { class MenuRoutePoints : public MenuInformationSites
public: {
/** public:
* @brief Construct a new Menu Route Points object /**
* * @brief Construct a new Menu Route Points object
* @param route *
*/ * @param route
MenuRoutePoints(Route *route); */
MenuRoutePoints(Route *route);
/** /**
* @brief Configure the base class MenuInformationSites * @brief Configure the base class MenuInformationSites
* *
* Set the amount of pages. * Set the amount of pages.
*/ */
void init () override; void init() override;
/** /**
* @brief Prints the the coordinates of the current Point. * @brief Prints the the coordinates of the current Point.
*/ */
void printPage() const override; void printPage() const override;
private:
Route* route;
bool error = false;
private:
Route *route;
bool error = false;
}; };
#endif // MENU_ROUTE_POINTS_H #endif // MENU_ROUTE_POINTS_H
@@ -0,0 +1,177 @@
/**
* @file menuSensorData.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-09-04
*
* @copyright Copyright (c) 2023
*
*/
#include "menuSensorData.h"
MenuSensorData::MenuSensorData(SensorData *sensorData) : MenuInformationSites(7), sensorData{sensorData}
{
this->noEqualLeft = true;
}
void MenuSensorData::printPage() const
{
const UBX_NAV_PVT_data_t *gpsData = this->sensorData->getGnssData();
uint8_t fixType = 0;
if (static_cast<bool>(gpsData))
{
fixType = gpsData->fixType;
}
String lineOne = "";
String lineTwo = "";
switch (this->getCurrentPage())
{
case 0:
lineOne = " Y P R :";
lineTwo.concat(this->sensorData->getGyroData()[0]);
lineTwo.concat(" ");
lineTwo.concat(this->sensorData->getGyroData()[1]);
lineTwo.concat(" ");
lineTwo.concat(this->sensorData->getGyroData()[2]);
break;
case 1:
lineOne = "Real Azimuth:";
lineTwo.concat(this->sensorData->getRealAzimuth());
break;
case 2:
lineOne = "Calc Azimuth:";
lineTwo.concat(this->sensorData->getCalcAzimuth());
lineTwo.concat(" ");
lineTwo.concat(CalcAzimuth::stateToString(this->sensorData->getCalcAzimuthState()));
break;
case 3:
{
lineOne = "Lat:";
lineTwo = "Lon:";
const Point pos = this->sensorData->getCurrentPos();
lineOne.concat(pos.getLatitude());
lineTwo.concat(pos.getLongitude());
}
break;
case 4:
lineOne = "Time: ";
lineTwo = "";
if (static_cast<bool>(fixType))
{
if (gpsData->hour < 10)
{
lineTwo.concat("0");
}
lineTwo.concat(gpsData->hour);
lineTwo.concat(":");
if (gpsData->min < 10)
{
lineTwo.concat("0");
}
lineTwo.concat(gpsData->min);
lineTwo.concat(":");
if (gpsData->sec < 10)
{
lineTwo.concat("0");
}
lineTwo.concat(gpsData->sec);
}
else
{
lineTwo = "00:00:00";
}
break;
case 5:
{
lineOne = "CarSol: ";
lineTwo = "Ntrip: ";
const uint8_t carrSoln = gpsData->flags.bits.carrSoln;
if (carrSoln == 0)
{
lineOne.concat("None");
}
else if (carrSoln == 1)
{
lineOne.concat("Floating");
}
else if (carrSoln == 2)
{
lineOne.concat("Fixed");
}
else
{
lineOne = "UNKNOWN";
}
const NTRIPClientStates status = this->sensorData->getNtripState();
if (status == NTRIPClientStates::pushingData)
{
lineTwo.concat("enabled");
}
else if (status == NTRIPClientStates::notAvailable)
{
lineTwo.concat(" N/A");
}
else
{
lineTwo.concat("disabled");
}
}
break;
case 6:
lineOne = "HAcc: ";
lineTwo = "Sats: ";
if (static_cast<bool>(fixType))
{
lineOne.concat(gpsData->hAcc);
lineTwo.concat(gpsData->numSV);
}
else
{
lineOne.concat("-/-");
lineTwo.concat("-/-");
}
break;
default:
this->printDefault();
return;
}
this->print(lineOne, lineTwo);
}
void MenuSensorData::runCommand()
{
switch (this->getCurrentPage())
{
case 5:
{
NTRIPClient* client = this->sensorData->getNtripClient();
NTRIPClientStates state = client->getClientState();
if (state == NTRIPClientStates::pushingData)
{
client->deactivate();
}
else if (state == NTRIPClientStates::waiting)
{
client->activate();
}
}
break;
default:
break;
}
}

Some files were not shown because too many files have changed in this diff Show More