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.
|
* Write some debug information to the serial port and initialize the display.
|
||||||
*/
|
*/
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(BAUDRATE);
|
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.
|
* Continously read the serial port if input is available. On line change send to the command handler.
|
||||||
*/
|
*/
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
while (Serial.available() > 0)
|
while (Serial.available() > 0)
|
||||||
@ -70,19 +72,3 @@ void loop()
|
|||||||
cmd_handler.parseJSON(input.c_str());
|
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