add and implement spot and incident icons

This commit is contained in:
interfisch 2018-03-25 21:20:39 +02:00
parent dab4262720
commit f10d63c2fa
3 changed files with 51 additions and 4 deletions

BIN
icon_incident.xcf Normal file

Binary file not shown.

BIN
icon_spot.xcf Normal file

Binary file not shown.

View File

@ -130,6 +130,49 @@ char tempstring[16]; //for dtostrf //dtostrf(modefactor,1,3,tempstring);
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
//Icon Spot
#define ICON_METERINGMODE_HEIGHT 16
#define ICON_METERINGMODE_WIDTH 16
static const unsigned char PROGMEM icon_spot[] =
{ B00000001, B10000000,
B00000001, B10000000,
B00000111, B11100000,
B00011101, B10111000,
B00010001, B10001000,
B00110001, B10001100,
B00100000, B00000100,
B11111100, B00111111,
B11111100, B00111111,
B00100000, B00000100,
B00110001, B10001100,
B00010001, B10001000,
B00011101, B10111000,
B00000111, B11100000,
B00000001, B10000000,
B00000001, B10000000
};
static const unsigned char PROGMEM icon_incident[] =
{ B10000010, B00000000,
B10000100, B00011000,
B11100000, B01100000,
B10111001, B10000000,
B10001100, B00000110,
B10000100, B00111000,
B10000110, B11000000,
B10000010, B00000000,
B10000010, B00000000,
B10000110, B11000000,
B10000100, B00111000,
B10001100, B00000110,
B10111001, B10000000,
B11100000, B01100000,
B10000100, B00011000,
B10000010, B00000000
};
void setup() {
Serial.begin(9600);
Serial.println("Started");
@ -803,6 +846,8 @@ void updateDisplay_Lightmeter() //Lightmeter display
#define ypos_aperature 29
#define xpos_shutter 60
#define ypos_shutter 29
#define xpos_icon 112 //128-16
#define ypos_icon 29
#define xpos_debug 0
#define ypos_debug 63-7
@ -861,6 +906,12 @@ void updateDisplay_Lightmeter() //Lightmeter display
if (setShutter>0){ //Shutter Priority Mode
display.drawRect(xpos_shutter-2, ypos_shutter-2, 40, 18, WHITE);
}
if (meteringmode == METERINGMODE_REFLECTIVE){
display.drawBitmap(xpos_icon, ypos_icon, icon_spot, ICON_METERINGMODE_HEIGHT, ICON_METERINGMODE_WIDTH, 1);
}else if (meteringmode == METERINGMODE_INCIDENT) {
display.drawBitmap(xpos_icon, ypos_icon, icon_incident, ICON_METERINGMODE_HEIGHT, ICON_METERINGMODE_WIDTH, 1);
}
//ISO
display.setCursor(xpos_iso,ypos_iso); display.setTextSize(1); display.print("ISO "); display.print(setISO);
@ -874,10 +925,6 @@ void updateDisplay_Lightmeter() //Lightmeter display
display.print(ev);
display.print(" |");
display.print(incident);
display.setTextSize(1);
display.setCursor(10,10);
display.print(meteringmode);
}