mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2025-12-06 07:42:00 +01:00
cppcheck fixes
This commit is contained in:
parent
47a4455145
commit
32a201b980
2
.github/workflows/build_check.yml
vendored
2
.github/workflows/build_check.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
- run: platformio check --fail-on-defect low --fail-on-defect medium --fail-on-defect high --skip-packages --flags "--suppress=*:*.pio\* --inline-suppr lib/common/src" -v
|
- run: platformio check --fail-on-defect low --fail-on-defect medium --fail-on-defect high --skip-packages --flags "--suppress=*:*.pio\* --inline-suppr" -v
|
||||||
|
|
||||||
PlatformIO-Build:
|
PlatformIO-Build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ BoardConfig::BoardConfig(
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BoardFinder::BoardFinder(std::list<std::shared_ptr<BoardConfig>> boardConfigs)
|
BoardFinder::BoardFinder(std::list<std::shared_ptr<BoardConfig>> & boardConfigs)
|
||||||
|
: _boardConfigs(boardConfigs)
|
||||||
{
|
{
|
||||||
_boardConfigs = boardConfigs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<BoardConfig> BoardFinder::searchBoardConfig()
|
std::shared_ptr<BoardConfig> BoardFinder::searchBoardConfig()
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ enum BoardType
|
||||||
class BoardConfig
|
class BoardConfig
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BoardConfig(
|
explicit BoardConfig(
|
||||||
String name, BoardType type,
|
String name, BoardType type,
|
||||||
uint8_t oledsda, uint8_t oledscl, uint8_t oledaddr, uint8_t oledreset,
|
uint8_t oledsda, uint8_t oledscl, uint8_t oledaddr, uint8_t oledreset,
|
||||||
uint8_t lorasck, uint8_t loramiso, uint8_t loramosi, uint8_t loracs, uint8_t lorareset, uint8_t lorairq,
|
uint8_t lorasck, uint8_t loramiso, uint8_t loramosi, uint8_t loracs, uint8_t lorareset, uint8_t lorairq,
|
||||||
|
|
@ -51,7 +51,7 @@ public:
|
||||||
class BoardFinder
|
class BoardFinder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BoardFinder(std::list<std::shared_ptr<BoardConfig>> boardConfigs);
|
explicit BoardFinder(std::list<std::shared_ptr<BoardConfig>> & boardConfigs);
|
||||||
|
|
||||||
std::shared_ptr<BoardConfig> searchBoardConfig();
|
std::shared_ptr<BoardConfig> searchBoardConfig();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,11 @@ class NTPClient {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NTPClient();
|
NTPClient();
|
||||||
NTPClient(long timeOffset);
|
explicit NTPClient(long timeOffset);
|
||||||
NTPClient(const char* poolServerName);
|
explicit NTPClient(const char* poolServerName);
|
||||||
NTPClient(const char* poolServerName, long timeOffset);
|
NTPClient(const char* poolServerName, long timeOffset);
|
||||||
NTPClient(const char* poolServerName, long timeOffset, unsigned long updateInterval);
|
NTPClient(const char* poolServerName, long timeOffset, unsigned long updateInterval);
|
||||||
NTPClient(IPAddress poolServerIP);
|
explicit NTPClient(IPAddress poolServerIP);
|
||||||
NTPClient(IPAddress poolServerIP, long timeOffset);
|
NTPClient(IPAddress poolServerIP, long timeOffset);
|
||||||
NTPClient(IPAddress poolServerIP, long timeOffset, unsigned long updateInterval);
|
NTPClient(IPAddress poolServerIP, long timeOffset, unsigned long updateInterval);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
Adafruit_SSD1306 * display = 0;
|
Adafruit_SSD1306 * display = 0;
|
||||||
TwoWire * wire = 0;
|
TwoWire * wire = 0;
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void setup_display(std::shared_ptr<BoardConfig> boardConfig)
|
void setup_display(std::shared_ptr<BoardConfig> boardConfig)
|
||||||
{
|
{
|
||||||
if(display == 0)
|
if(display == 0)
|
||||||
|
|
@ -35,12 +36,12 @@ void setup_display(std::shared_ptr<BoardConfig> boardConfig)
|
||||||
logPrintlnI("Display init done!");
|
logPrintlnI("Display init done!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void turn_off_display()
|
/*void turn_off_display()
|
||||||
{
|
{
|
||||||
display->ssd1306_command(SSD1306_DISPLAYOFF);
|
display->ssd1306_command(SSD1306_DISPLAYOFF);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void show_display(String header, int wait)
|
/*void show_display(String header, int wait)
|
||||||
{
|
{
|
||||||
display->clearDisplay();
|
display->clearDisplay();
|
||||||
display->setTextColor(WHITE);
|
display->setTextColor(WHITE);
|
||||||
|
|
@ -49,8 +50,9 @@ void show_display(String header, int wait)
|
||||||
display->println(header);
|
display->println(header);
|
||||||
display->display();
|
display->display();
|
||||||
delay(wait);
|
delay(wait);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void show_display(String header, String line1, int wait)
|
void show_display(String header, String line1, int wait)
|
||||||
{
|
{
|
||||||
display->clearDisplay();
|
display->clearDisplay();
|
||||||
|
|
@ -65,6 +67,7 @@ void show_display(String header, String line1, int wait)
|
||||||
delay(wait);
|
delay(wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void show_display(String header, String line1, String line2, int wait)
|
void show_display(String header, String line1, String line2, int wait)
|
||||||
{
|
{
|
||||||
display->clearDisplay();
|
display->clearDisplay();
|
||||||
|
|
@ -81,6 +84,7 @@ void show_display(String header, String line1, String line2, int wait)
|
||||||
delay(wait);
|
delay(wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void show_display(String header, String line1, String line2, String line3, int wait)
|
void show_display(String header, String line1, String line2, String line3, int wait)
|
||||||
{
|
{
|
||||||
display->clearDisplay();
|
display->clearDisplay();
|
||||||
|
|
@ -99,7 +103,7 @@ void show_display(String header, String line1, String line2, String line3, int w
|
||||||
delay(wait);
|
delay(wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_display(String header, String line1, String line2, String line3, String line4, int wait)
|
/*void show_display(String header, String line1, String line2, String line3, String line4, int wait)
|
||||||
{
|
{
|
||||||
display->clearDisplay();
|
display->clearDisplay();
|
||||||
display->setTextColor(WHITE);
|
display->setTextColor(WHITE);
|
||||||
|
|
@ -117,9 +121,9 @@ void show_display(String header, String line1, String line2, String line3, Strin
|
||||||
display->println(line4);
|
display->println(line4);
|
||||||
display->display();
|
display->display();
|
||||||
delay(wait);
|
delay(wait);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait)
|
/*void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait)
|
||||||
{
|
{
|
||||||
display->clearDisplay();
|
display->clearDisplay();
|
||||||
display->setTextColor(WHITE);
|
display->setTextColor(WHITE);
|
||||||
|
|
@ -139,4 +143,4 @@ void show_display(String header, String line1, String line2, String line3, Strin
|
||||||
display->println(line5);
|
display->println(line5);
|
||||||
display->display();
|
display->display();
|
||||||
delay(wait);
|
delay(wait);
|
||||||
}
|
}*/
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@
|
||||||
#define DISPLAY_H_
|
#define DISPLAY_H_
|
||||||
|
|
||||||
void setup_display(std::shared_ptr<BoardConfig> boardConfig);
|
void setup_display(std::shared_ptr<BoardConfig> boardConfig);
|
||||||
void turn_off_display();
|
//void turn_off_display();
|
||||||
|
|
||||||
void show_display(String header, int wait = 0);
|
//void show_display(String header, int wait = 0);
|
||||||
void show_display(String header, String line1, int wait = 0);
|
void show_display(String header, String line1, int wait = 0);
|
||||||
void show_display(String header, String line1, String line2, int wait = 0);
|
void show_display(String header, String line1, String line2, int wait = 0);
|
||||||
void show_display(String header, String line1, String line2, String line3, int wait = 0);
|
void show_display(String header, String line1, String line2, String line3, int wait = 0);
|
||||||
void show_display(String header, String line1, String line2, String line3, String line4, int wait = 0);
|
//void show_display(String header, String line1, String line2, String line3, String line4, int wait = 0);
|
||||||
void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait = 0);
|
//void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait = 0);
|
||||||
|
|
||||||
#include <APRSMessage.h>
|
#include <APRSMessage.h>
|
||||||
#include "SignalSlot.h"
|
#include "SignalSlot.h"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue