Suppress unusedFunction warnings from cppcheck
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
18
src/main.cpp
18
src/main.cpp
@ -33,6 +33,7 @@ CommandHandler cmd_handler(&display);
|
||||
*
|
||||
* Write some debug information to the serial port and initialize the display.
|
||||
*/
|
||||
// cppcheck-suppress unusedFunction
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(BAUDRATE);
|
||||
@ -62,6 +63,7 @@ void setup()
|
||||
*
|
||||
* Continously read the serial port if input is available. On line change send to the command handler.
|
||||
*/
|
||||
// cppcheck-suppress unusedFunction
|
||||
void loop()
|
||||
{
|
||||
while (Serial.available() > 0)
|
||||
@ -69,20 +71,4 @@ void loop()
|
||||
String input = Serial.readStringUntil('\n');
|
||||
cmd_handler.parseJSON(input.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Wrapper around arduino setup/loop functions
|
||||
*
|
||||
* This mitigates static code analysis warnings.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int main()
|
||||
{
|
||||
setup();
|
||||
while(1)
|
||||
{
|
||||
loop();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user