Make the code more readable

This commit is contained in:
phl0
2018-06-13 13:07:06 +02:00
parent 768dbc305f
commit b56f037c0f

View File

@@ -106,9 +106,9 @@ const unsigned char logo_fusion_bmp [] =
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
//Logo P25 128x16px //Logo P25 128x16px
const unsigned char logo_P25_bmp [] = const unsigned char logo_P25_bmp [] =
{ {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xf8, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f,
0xf8, 0x00, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f,
@@ -125,11 +125,11 @@ const unsigned char logo_fusion_bmp [] =
0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x3f,
0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x03, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
}; };
// Logo NXDN_sm, 128x16px // Logo NXDN_sm, 128x16px
const unsigned char logo_NXDN_bmp [] = const unsigned char logo_NXDN_bmp [] =
{ {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf0, 0x1f, 0xf8, 0x0f, 0x00, 0xff, 0x80, 0x7c, 0x00, 0x0f, 0xff, 0x80, 0x7f, 0xe0, 0x7f, 0xff, 0xf0, 0x1f, 0xf8, 0x0f, 0x00, 0xff, 0x80, 0x7c, 0x00, 0x0f, 0xff, 0x80, 0x7f, 0xe0, 0x7f,
@@ -350,14 +350,12 @@ void COLED::clearDMRInt(unsigned int slotNo)
// if both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2 // if both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2
// if single slot, use lines 3-4 // if single slot, use lines 3-4
if ( m_slot1Enabled && m_slot2Enabled ){ if ( m_slot1Enabled && m_slot2Enabled ){
if (slotNo == 1U) if (slotNo == 1U) {
{
display.fillRect(0, OLED_LINE3, display.width(), 40, BLACK); display.fillRect(0, OLED_LINE3, display.width(), 40, BLACK);
display.setCursor(0,OLED_LINE3); display.setCursor(0,OLED_LINE3);
display.print("Slot: 1 Listening"); display.print("Slot: 1 Listening");
} }
else else {
{
display.fillRect(0, OLED_LINE5, display.width(), 40, BLACK); display.fillRect(0, OLED_LINE5, display.width(), 40, BLACK);
display.setCursor(0, OLED_LINE5); display.setCursor(0, OLED_LINE5);
display.print("Slot: 2 Listening"); display.print("Slot: 2 Listening");
@@ -369,7 +367,6 @@ void COLED::clearDMRInt(unsigned int slotNo)
display.printf("Slot: %i Listening",slotNo); display.printf("Slot: %i Listening",slotNo);
} }
display.fillRect(0, OLED_LINE6, display.width(), 20, BLACK); display.fillRect(0, OLED_LINE6, display.width(), 20, BLACK);
display.setCursor(0,OLED_LINE6); display.setCursor(0,OLED_LINE6);
display.printf("%s",m_ipaddress.c_str()); display.printf("%s",m_ipaddress.c_str());