kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
cppcheck fixes
rodzic
47a4455145
commit
32a201b980
|
@ -18,7 +18,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
with:
|
||||
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:
|
||||
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()
|
||||
|
|
|
@ -23,7 +23,7 @@ enum BoardType
|
|||
class BoardConfig
|
||||
{
|
||||
public:
|
||||
BoardConfig(
|
||||
explicit BoardConfig(
|
||||
String name, BoardType type,
|
||||
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,
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
class BoardFinder
|
||||
{
|
||||
public:
|
||||
BoardFinder(std::list<std::shared_ptr<BoardConfig>> boardConfigs);
|
||||
explicit BoardFinder(std::list<std::shared_ptr<BoardConfig>> & boardConfigs);
|
||||
|
||||
std::shared_ptr<BoardConfig> searchBoardConfig();
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ class NTPClient {
|
|||
|
||||
public:
|
||||
NTPClient();
|
||||
NTPClient(long timeOffset);
|
||||
NTPClient(const char* poolServerName);
|
||||
explicit NTPClient(long timeOffset);
|
||||
explicit NTPClient(const char* poolServerName);
|
||||
NTPClient(const char* poolServerName, long timeOffset);
|
||||
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, unsigned long updateInterval);
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
Adafruit_SSD1306 * display = 0;
|
||||
TwoWire * wire = 0;
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void setup_display(std::shared_ptr<BoardConfig> boardConfig)
|
||||
{
|
||||
if(display == 0)
|
||||
|
@ -35,12 +36,12 @@ void setup_display(std::shared_ptr<BoardConfig> boardConfig)
|
|||
logPrintlnI("Display init done!");
|
||||
}
|
||||
|
||||
void turn_off_display()
|
||||
/*void turn_off_display()
|
||||
{
|
||||
display->ssd1306_command(SSD1306_DISPLAYOFF);
|
||||
}
|
||||
}*/
|
||||
|
||||
void show_display(String header, int wait)
|
||||
/*void show_display(String header, int wait)
|
||||
{
|
||||
display->clearDisplay();
|
||||
display->setTextColor(WHITE);
|
||||
|
@ -49,8 +50,9 @@ void show_display(String header, int wait)
|
|||
display->println(header);
|
||||
display->display();
|
||||
delay(wait);
|
||||
}
|
||||
}*/
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void show_display(String header, String line1, int wait)
|
||||
{
|
||||
display->clearDisplay();
|
||||
|
@ -65,6 +67,7 @@ void show_display(String header, String line1, int wait)
|
|||
delay(wait);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void show_display(String header, String line1, String line2, int wait)
|
||||
{
|
||||
display->clearDisplay();
|
||||
|
@ -81,6 +84,7 @@ void show_display(String header, String line1, String line2, int wait)
|
|||
delay(wait);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void show_display(String header, String line1, String line2, String line3, int wait)
|
||||
{
|
||||
display->clearDisplay();
|
||||
|
@ -99,7 +103,7 @@ void show_display(String header, String line1, String line2, String line3, int w
|
|||
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->setTextColor(WHITE);
|
||||
|
@ -117,9 +121,9 @@ void show_display(String header, String line1, String line2, String line3, Strin
|
|||
display->println(line4);
|
||||
display->display();
|
||||
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->setTextColor(WHITE);
|
||||
|
@ -139,4 +143,4 @@ void show_display(String header, String line1, String line2, String line3, Strin
|
|||
display->println(line5);
|
||||
display->display();
|
||||
delay(wait);
|
||||
}
|
||||
}*/
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
#define DISPLAY_H_
|
||||
|
||||
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, 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, 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, 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 "SignalSlot.h"
|
||||
|
|
Ładowanie…
Reference in New Issue