kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
cppcheck update
rodzic
fbb2071045
commit
5b2b9dfdd8
|
@ -37,39 +37,32 @@ OLEDDisplay::OLEDDisplay(OLEDDISPLAY_GEOMETRY g) : _geometry(g), _displayIsOn(fa
|
|||
OLEDDisplay::~OLEDDisplay() {
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::displayOn() {
|
||||
sendCommand(DISPLAYON);
|
||||
_displayIsOn = true;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
bool OLEDDisplay::isDisplayOn() const {
|
||||
return _displayIsOn;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::displayOff() {
|
||||
sendCommand(DISPLAYOFF);
|
||||
_displayIsOn = false;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
bool OLEDDisplay::isDisplayOff() const {
|
||||
return !_displayIsOn;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::invertDisplay() {
|
||||
sendCommand(INVERTDISPLAY);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::normalDisplay() {
|
||||
sendCommand(NORMALDISPLAY);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::setContrast(uint8_t contrast, uint8_t precharge, uint8_t comdetect) {
|
||||
sendCommand(SETPRECHARGE); // 0xD9
|
||||
sendCommand(precharge); // 0xF1 default, to lower the contrast, put 1-1F
|
||||
|
@ -82,7 +75,6 @@ void OLEDDisplay::setContrast(uint8_t contrast, uint8_t precharge, uint8_t comde
|
|||
sendCommand(DISPLAYON);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::setBrightness(uint8_t brightness) {
|
||||
uint8_t contrast = brightness * 1.171 - 43;
|
||||
if (brightness < 128) {
|
||||
|
@ -98,19 +90,16 @@ void OLEDDisplay::setBrightness(uint8_t brightness) {
|
|||
setContrast(contrast, precharge, comdetect);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::resetOrientation() {
|
||||
sendCommand(SEGREMAP);
|
||||
sendCommand(COMSCANINC);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::flipScreenVertically() {
|
||||
sendCommand(SEGREMAP | 0x01);
|
||||
sendCommand(COMSCANDEC);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::mirrorScreen() {
|
||||
sendCommand(SEGREMAP);
|
||||
sendCommand(COMSCANDEC);
|
||||
|
@ -123,11 +112,9 @@ void OLEDDisplay::display(Bitmap *bitmap) {
|
|||
internDisplay(bitmap);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::clear() {
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
uint OLEDDisplay::getWidth() {
|
||||
switch (_geometry) {
|
||||
case GEOMETRY_128_64:
|
||||
|
@ -140,7 +127,6 @@ uint OLEDDisplay::getWidth() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
uint OLEDDisplay::getHeight() {
|
||||
switch (_geometry) {
|
||||
case GEOMETRY_128_64:
|
||||
|
@ -154,7 +140,6 @@ uint OLEDDisplay::getHeight() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void OLEDDisplay::sendInitCommands() {
|
||||
sendCommand(DISPLAYOFF);
|
||||
sendCommand(SETDISPLAYCLOCKDIV);
|
||||
|
|
|
@ -16,12 +16,10 @@ void PowerManagement::activateLoRa() {
|
|||
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void PowerManagement::deactivateLoRa() {
|
||||
axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void PowerManagement::activateGPS() {
|
||||
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);
|
||||
}
|
||||
|
@ -34,7 +32,6 @@ void PowerManagement::activateOLED() {
|
|||
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void PowerManagement::deactivateOLED() {
|
||||
axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ bool TaskManager::loop(System &system) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void StatusFrame::drawStatusPage(Bitmap &bitmap) {
|
||||
int y = 0;
|
||||
for (Task const *const task : _tasks) {
|
||||
|
|
|
@ -13,12 +13,10 @@ uint32_t Timer::getTriggerTimeInSec() const {
|
|||
return (_nextTimeout - millis()) / 1000;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
bool Timer::isActive() const {
|
||||
return _nextTimeout != 0;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
void Timer::reset() {
|
||||
_nextTimeout = 0;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue