kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
restructure code
rodzic
8c2c217acc
commit
8f25ceddcf
|
@ -37,17 +37,6 @@ jobs:
|
||||||
formatting-check:
|
formatting-check:
|
||||||
name: Formatting Check
|
name: Formatting Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
path:
|
|
||||||
- 'src'
|
|
||||||
- 'lib/BoardFinder'
|
|
||||||
- 'lib/ConfigurationManagement'
|
|
||||||
#- 'lib/Display'
|
|
||||||
- 'lib/NTPClient'
|
|
||||||
- 'lib/PowerManagement'
|
|
||||||
- 'lib/System'
|
|
||||||
- 'lib/TimeLib'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -55,7 +44,7 @@ jobs:
|
||||||
uses: jidicula/clang-format-action@v4.10.2
|
uses: jidicula/clang-format-action@v4.10.2
|
||||||
with:
|
with:
|
||||||
clang-format-version: '14'
|
clang-format-version: '14'
|
||||||
check-path: ${{ matrix.path }}
|
check-path: src
|
||||||
|
|
||||||
cppcheck:
|
cppcheck:
|
||||||
name: Run cppcheck
|
name: Run cppcheck
|
||||||
|
@ -81,24 +70,24 @@ jobs:
|
||||||
- name: Run PlatformIO Check
|
- name: Run PlatformIO Check
|
||||||
run: pio check --fail-on-defect high --fail-on-defect medium --fail-on-defect low -e lora_board
|
run: pio check --fail-on-defect high --fail-on-defect medium --fail-on-defect low -e lora_board
|
||||||
|
|
||||||
cppcheck-docker:
|
# cppcheck-docker:
|
||||||
name: Run cppcheck in Docker
|
# name: Run cppcheck in Docker
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
env:
|
# env:
|
||||||
CPPCHECK_ARGS: --enable=all --std=c++20 --inline-suppr -I lib/BoardFinder -I lib/ConfigurationManagement -I lib/Display -I lib/LoRa -I lib/LoRa_APRS -I lib/NTPClient -I lib/PowerManagement -I lib/System -I lib/TimeLib -i lib/Display -i lib/LoRa -i lib/NTPClient -i lib/TimeLib src lib
|
# CPPCHECK_ARGS: --enable=all --std=c++20 --inline-suppr -I lib/BoardFinder -I lib/ConfigurationManagement -I lib/Display -I lib/LoRa -I lib/LoRa_APRS -I lib/NTPClient -I lib/PowerManagement -I lib/System -I lib/TimeLib -i lib/Display -i lib/LoRa -i lib/NTPClient -i lib/TimeLib src lib
|
||||||
steps:
|
# steps:
|
||||||
- name: checkout code
|
# - name: checkout code
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
- run: docker pull facthunder/cppcheck:latest
|
# - run: docker pull facthunder/cppcheck:latest
|
||||||
- name: Run cppcheck and print result
|
# - name: Run cppcheck and print result
|
||||||
run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck $CPPCHECK_ARGS"
|
# run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck $CPPCHECK_ARGS"
|
||||||
- name: Run cppcheck and create html
|
# - name: Run cppcheck and create html
|
||||||
run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck --xml $CPPCHECK_ARGS 2> report.xml && cppcheck-htmlreport --file=report.xml --report-dir=output"
|
# run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck --xml $CPPCHECK_ARGS 2> report.xml && cppcheck-htmlreport --file=report.xml --report-dir=output"
|
||||||
- name: Upload report
|
# - name: Upload report
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: Cppcheck Report
|
# name: Cppcheck Report
|
||||||
path: output
|
# path: output
|
||||||
|
|
||||||
hw_testing:
|
hw_testing:
|
||||||
name: Hardware Testing
|
name: Hardware Testing
|
||||||
|
|
|
@ -28,7 +28,7 @@ lib_deps =
|
||||||
shaggydog/OneButton @ 1.5.0
|
shaggydog/OneButton @ 1.5.0
|
||||||
jgromes/RadioLib @ 6.1.0
|
jgromes/RadioLib @ 6.1.0
|
||||||
check_tool = cppcheck
|
check_tool = cppcheck
|
||||||
check_flags = cppcheck: --std=c++20 --suppress=*:*.pio\* --inline-suppr --suppress=unusedFunction -DCPPCHECK --force lib -ilib/TimeLib
|
check_flags = cppcheck: --std=c++20 --suppress=*:*.pio\* --inline-suppr --suppress=unusedFunction --suppress=shadowFunction:*TimeLib.cpp --suppress=unreadVariable:*TimeLib.cpp
|
||||||
check_skip_packages = yes
|
check_skip_packages = yes
|
||||||
test_build_src = yes
|
test_build_src = yes
|
||||||
# activate for OTA Update, use the CALLSIGN from is-cfg.json as upload_port:
|
# activate for OTA Update, use the CALLSIGN from is-cfg.json as upload_port:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "BoardFinder.h"
|
#include "BoardFinder.h"
|
||||||
|
#include "PowerManagement/power_management.h"
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
#include <power_management.h>
|
|
||||||
|
|
||||||
#define MODULE_NAME "BoardFinder"
|
#define MODULE_NAME "BoardFinder"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "Display.h"
|
#include "Display.h"
|
||||||
#include <TaskManager.h>
|
#include "System/TaskManager.h"
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
|
|
||||||
Display::Display() : _disp(0), _statusFrame(0), _displaySaveMode(false) {
|
Display::Display() : _disp(0), _statusFrame(0), _displaySaveMode(false) {
|
|
@ -1,10 +1,10 @@
|
||||||
#ifndef DISPLAY_H_
|
#ifndef DISPLAY_H_
|
||||||
#define DISPLAY_H_
|
#define DISPLAY_H_
|
||||||
|
|
||||||
|
#include "BoardFinder/BoardFinder.h"
|
||||||
|
#include "Display/SSD1306.h"
|
||||||
|
#include "System/Timer.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <BoardFinder.h>
|
|
||||||
#include <SSD1306.h>
|
|
||||||
#include <Timer.h>
|
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <RadioLib.h>
|
#include <RadioLib.h>
|
||||||
|
|
||||||
#include "BoardFinder.h"
|
#include "BoardFinder/BoardFinder.h"
|
||||||
#include "project_configuration.h"
|
#include "project_configuration.h"
|
||||||
|
|
||||||
class LoRaModem {
|
class LoRaModem {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#ifndef UNIT_TEST
|
#ifndef UNIT_TEST
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include <APRS-IS.h>
|
#include "APRS-IS/APRS-IS.h"
|
||||||
#include <BoardFinder.h>
|
#include "BoardFinder/BoardFinder.h"
|
||||||
#include <System.h>
|
#include "PowerManagement/power_management.h"
|
||||||
#include <TaskManager.h>
|
#include "System/System.h"
|
||||||
|
#include "System/TaskManager.h"
|
||||||
#include <esp_task_wdt.h>
|
#include <esp_task_wdt.h>
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
#include <power_management.h>
|
|
||||||
|
|
||||||
#include "TaskAprsIs.h"
|
#include "TaskAprsIs.h"
|
||||||
#include "TaskBeacon.h"
|
#include "TaskBeacon.h"
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "BoardFinder/BoardFinder.h"
|
||||||
|
#include "ConfigurationManagement/configuration.h"
|
||||||
|
#include "Display/Display.h"
|
||||||
#include "TaskManager.h"
|
#include "TaskManager.h"
|
||||||
#include <BoardFinder.h>
|
|
||||||
#include <Display.h>
|
|
||||||
#include <configuration.h>
|
|
||||||
|
|
||||||
class System {
|
class System {
|
||||||
public:
|
public:
|
|
@ -1,5 +1,5 @@
|
||||||
#include "TaskManager.h"
|
#include "TaskManager.h"
|
||||||
#include <FontConfig.h>
|
#include "Display/FontConfig.h"
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
|
|
||||||
#define MODULE_NAME "TaskManager"
|
#define MODULE_NAME "TaskManager"
|
|
@ -5,9 +5,9 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <BoardFinder.h>
|
#include "BoardFinder/BoardFinder.h"
|
||||||
#include <Display.h>
|
#include "ConfigurationManagement/configuration.h"
|
||||||
#include <configuration.h>
|
#include "Display/Display.h"
|
||||||
|
|
||||||
#include "TaskQueue.h"
|
#include "TaskQueue.h"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#ifndef TASK_APRS_IS_H_
|
#ifndef TASK_APRS_IS_H_
|
||||||
#define TASK_APRS_IS_H_
|
#define TASK_APRS_IS_H_
|
||||||
|
|
||||||
#include <APRS-IS.h>
|
#include "APRS-IS/APRS-IS.h"
|
||||||
|
#include "System/TaskManager.h"
|
||||||
|
#include "System/Timer.h"
|
||||||
#include <APRSMessage.h>
|
#include <APRSMessage.h>
|
||||||
#include <TaskManager.h>
|
|
||||||
#include <Timer.h>
|
|
||||||
|
|
||||||
class AprsIsTask : public Task {
|
class AprsIsTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
|
|
||||||
|
#include "TimeLib/TimeLib.h"
|
||||||
#include <OneButton.h>
|
#include <OneButton.h>
|
||||||
#include <TimeLib.h>
|
|
||||||
|
|
||||||
#include "Task.h"
|
#include "Task.h"
|
||||||
#include "TaskBeacon.h"
|
#include "TaskBeacon.h"
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
#include <OneButton.h>
|
#include <OneButton.h>
|
||||||
#include <TinyGPS++.h>
|
#include <TinyGPS++.h>
|
||||||
|
|
||||||
|
#include "System/TaskManager.h"
|
||||||
#include <APRSMessage.h>
|
#include <APRSMessage.h>
|
||||||
#include <TaskMQTT.h>
|
#include <TaskMQTT.h>
|
||||||
#include <TaskManager.h>
|
|
||||||
|
|
||||||
class BeaconTask : public Task {
|
class BeaconTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef TASK_DISPLAY_H_
|
#ifndef TASK_DISPLAY_H_
|
||||||
#define TASK_DISPLAY_H_
|
#define TASK_DISPLAY_H_
|
||||||
|
|
||||||
#include <Display.h>
|
#include "Display/Display.h"
|
||||||
#include <TaskManager.h>
|
#include "System/TaskManager.h"
|
||||||
|
|
||||||
class DisplayTask : public Task {
|
class DisplayTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef TASK_ETH_H_
|
#ifndef TASK_ETH_H_
|
||||||
#define TASK_ETH_H_
|
#define TASK_ETH_H_
|
||||||
|
|
||||||
#include <TaskManager.h>
|
#include "System/TaskManager.h"
|
||||||
|
|
||||||
void setWiFiLogger(logging::Logger *logger);
|
void setWiFiLogger(logging::Logger *logger);
|
||||||
void WiFiEvent(WiFiEvent_t event);
|
void WiFiEvent(WiFiEvent_t event);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef TASK_FTP_H_
|
#ifndef TASK_FTP_H_
|
||||||
#define TASK_FTP_H_
|
#define TASK_FTP_H_
|
||||||
|
|
||||||
|
#include "System/TaskManager.h"
|
||||||
#include <ESP-FTP-Server-Lib.h>
|
#include <ESP-FTP-Server-Lib.h>
|
||||||
#include <TaskManager.h>
|
|
||||||
|
|
||||||
class FTPTask : public Task {
|
class FTPTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#ifndef TASK_MQTT_H_
|
#ifndef TASK_MQTT_H_
|
||||||
#define TASK_MQTT_H_
|
#define TASK_MQTT_H_
|
||||||
|
|
||||||
|
#include "System/TaskManager.h"
|
||||||
#include <APRSMessage.h>
|
#include <APRSMessage.h>
|
||||||
#include <PubSubClient.h>
|
#include <PubSubClient.h>
|
||||||
#include <TaskManager.h>
|
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
|
|
||||||
class MQTTTask : public Task {
|
class MQTTTask : public Task {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
|
|
||||||
#include <TimeLib.h>
|
#include "TimeLib/TimeLib.h"
|
||||||
|
|
||||||
#include "Task.h"
|
#include "Task.h"
|
||||||
#include "TaskNTP.h"
|
#include "TaskNTP.h"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef TASK_NTP_H_
|
#ifndef TASK_NTP_H_
|
||||||
#define TASK_NTP_H_
|
#define TASK_NTP_H_
|
||||||
|
|
||||||
#include <NTPClient.h>
|
#include "NTPClient/NTPClient.h"
|
||||||
#include <TaskManager.h>
|
#include "System/TaskManager.h"
|
||||||
|
|
||||||
class NTPTask : public Task {
|
class NTPTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef TASK_OTA_H_
|
#ifndef TASK_OTA_H_
|
||||||
#define TASK_OTA_H_
|
#define TASK_OTA_H_
|
||||||
|
|
||||||
|
#include "System/TaskManager.h"
|
||||||
#include <ArduinoOTA.h>
|
#include <ArduinoOTA.h>
|
||||||
#include <TaskManager.h>
|
|
||||||
|
|
||||||
class OTATask : public Task {
|
class OTATask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <Task.h>
|
#include "Task.h"
|
||||||
#include <TimeLib.h>
|
#include "TimeLib/TimeLib.h"
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
|
|
||||||
#include "TaskRadiolib.h"
|
#include "TaskRadiolib.h"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#ifndef TASK_LORA_H_
|
#ifndef TASK_LORA_H_
|
||||||
#define TASK_LORA_H_
|
#define TASK_LORA_H_
|
||||||
|
|
||||||
|
#include "BoardFinder/BoardFinder.h"
|
||||||
|
#include "LoRaModem.h"
|
||||||
|
#include "System/TaskManager.h"
|
||||||
#include "project_configuration.h"
|
#include "project_configuration.h"
|
||||||
#include <APRS-Decoder.h>
|
#include <APRS-Decoder.h>
|
||||||
#include <BoardFinder.h>
|
|
||||||
#include <LoRaModem.h>
|
|
||||||
#include <TaskManager.h>
|
|
||||||
|
|
||||||
class RadiolibTask : public Task {
|
class RadiolibTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <logger.h>
|
#include <logger.h>
|
||||||
|
|
||||||
#include <TimeLib.h>
|
#include "TimeLib/TimeLib.h"
|
||||||
|
|
||||||
#include "Task.h"
|
#include "Task.h"
|
||||||
#include "TaskRouter.h"
|
#include "TaskRouter.h"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#ifndef TASK_ROUTER_H_
|
#ifndef TASK_ROUTER_H_
|
||||||
#define TASK_ROUTER_H_
|
#define TASK_ROUTER_H_
|
||||||
|
|
||||||
|
#include "System/TaskManager.h"
|
||||||
#include <APRSMessage.h>
|
#include <APRSMessage.h>
|
||||||
#include <TaskMQTT.h>
|
#include <TaskMQTT.h>
|
||||||
#include <TaskManager.h>
|
|
||||||
|
|
||||||
class RouterTask : public Task {
|
class RouterTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef TASK_WIFI_H_
|
#ifndef TASK_WIFI_H_
|
||||||
#define TASK_WIFI_H_
|
#define TASK_WIFI_H_
|
||||||
|
|
||||||
#include <TaskManager.h>
|
#include "System/TaskManager.h"
|
||||||
#include <WiFiMulti.h>
|
#include <WiFiMulti.h>
|
||||||
|
|
||||||
class WifiTask : public Task {
|
class WifiTask : public Task {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef PROJECT_CONFIGURATION_H_
|
#ifndef PROJECT_CONFIGURATION_H_
|
||||||
#define PROJECT_CONFIGURATION_H_
|
#define PROJECT_CONFIGURATION_H_
|
||||||
|
|
||||||
#include <BoardFinder.h>
|
#include "BoardFinder/BoardFinder.h"
|
||||||
#include <configuration.h>
|
#include "ConfigurationManagement/configuration.h"
|
||||||
|
|
||||||
class Configuration {
|
class Configuration {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <unity.h>
|
#include <unity.h>
|
||||||
|
|
||||||
#include <BoardFinder.h>
|
#include "BoardFinder/BoardFinder.h"
|
||||||
|
|
||||||
std::list<BoardConfig const *> boardConfigs;
|
std::list<BoardConfig const *> boardConfigs;
|
||||||
logging::Logger logger;
|
logging::Logger logger;
|
||||||
|
|
Ładowanie…
Reference in New Issue