- First complete version of firmware. Currently being tested in the rehearsal room
- Added bunch of screens, fonts and images - Added script to read out frame buffer (function currently disabled in Firmware)
This commit is contained in:
@@ -140,17 +140,27 @@ bool EEPROM_Write_Data(uint section)
|
||||
|
||||
void EEPROM_Check_Content_Valid()
|
||||
{
|
||||
if(_EEPROM_Content.Device_Configuration.Idle_Screen > IDLE_SCREEN_MODE_ACTIVITY) {
|
||||
if((uint32_t)_EEPROM_Content.Device_Configuration.Idle_Screen > IDLE_SCREEN_MODE_ACTIVITY) {
|
||||
_EEPROM_Content.Device_Configuration.Idle_Screen = IDLE_SCREEN_BLACK;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Device_Configuration.Screen_Timeout > SCREEN_TIMEOUT_MAX_s) {
|
||||
_EEPROM_Content.Device_Configuration.Screen_Timeout = SCREEN_TIMEOUT_MAX_s;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Device_Configuration.Screen_Timeout < SCREEN_TIMEOUT_MIN_s) {
|
||||
_EEPROM_Content.Device_Configuration.Screen_Timeout = SCREEN_TIMEOUT_MIN_s;
|
||||
}
|
||||
|
||||
// Reverse Scrolling no need, as bool is compared with equal to 0
|
||||
if((uint32_t)_EEPROM_Content.Device_Configuration.Reverse_List_Scrolling > 1) {
|
||||
_EEPROM_Content.Device_Configuration.Reverse_List_Scrolling = 1;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].MIDI_Channel > MIDI_CHANNEL_16) {
|
||||
if((uint32_t)_EEPROM_Content.Device_Configuration.Use_Color_Correction > 1) {
|
||||
_EEPROM_Content.Device_Configuration.Use_Color_Correction = 1;
|
||||
}
|
||||
|
||||
if((uint32_t)_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].MIDI_Channel > MIDI_CHANNEL_16) {
|
||||
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].MIDI_Channel = MIDI_CHANNEL_1;
|
||||
}
|
||||
|
||||
@@ -161,25 +171,33 @@ void EEPROM_Check_Content_Valid()
|
||||
|
||||
// Note Colors no need, as full range of UINT8 is valid
|
||||
|
||||
if(_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Skip_Note_Off_Event > 1) {
|
||||
if((uint32_t)_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Skip_Note_Off_Event > 1) {
|
||||
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Skip_Note_Off_Event = 1;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Enabled > 1) {
|
||||
if((uint32_t)_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Note_Reset_Enabled > 1) {
|
||||
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Note_Reset_Enabled = 1;
|
||||
}
|
||||
|
||||
if((uint32_t)_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Note_Reset_Timeout > 600) {
|
||||
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Note_Reset_Timeout = 600;
|
||||
}
|
||||
|
||||
if((uint32_t)_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Enabled > 1) {
|
||||
_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Enabled = 1;
|
||||
}
|
||||
|
||||
// Pause Light Color no need, as full range of UINT8 is valid
|
||||
|
||||
if(_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Timeout > PAUSE_LIGHT_DELAY_MAX_s) {
|
||||
if((uint32_t)_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Timeout > PAUSE_LIGHT_DELAY_MAX_s) {
|
||||
_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Timeout = PAUSE_LIGHT_DELAY_MIN_s;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Reset_Condition > CHANNEL_AND_EVENT_MATCH) {
|
||||
if((uint32_t)_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Reset_Condition > CHANNEL_AND_EVENT_MATCH) {
|
||||
_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Reset_Condition = ANY_TRAFFIC;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Fade_Speed > FADE_SPEED_MAX) {
|
||||
if((uint32_t)_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Fade_Speed > FADE_SPEED_MAX) {
|
||||
_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Fade_Speed = FADE_SPEED_MIN;
|
||||
}
|
||||
|
||||
@@ -187,16 +205,16 @@ void EEPROM_Check_Content_Valid()
|
||||
|
||||
// Note Stack Enabled no need, as bool is compared with equal to 0
|
||||
|
||||
if(_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s > DURATION_MAX_s) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s = DURATION_MAX_s;
|
||||
if((uint32_t)_EEPROM_Content.Jam_Light_Configuration.Durations.Max > DURATION_MAX_s) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Durations.Max = DURATION_MAX_s;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Jam_Light_Configuration.Duration_Min_s > _EEPROM_Content.Jam_Light_Configuration.Duration_Max_s || _EEPROM_Content.Jam_Light_Configuration.Duration_Min_s < DURATION_MIN_s) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Duration_Min_s = DURATION_MIN_s;
|
||||
if((uint32_t)_EEPROM_Content.Jam_Light_Configuration.Durations.Min > _EEPROM_Content.Jam_Light_Configuration.Durations.Max || _EEPROM_Content.Jam_Light_Configuration.Durations.Min < DURATION_MIN_s) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Durations.Min = DURATION_MIN_s;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s <= _EEPROM_Content.Jam_Light_Configuration.Duration_Min_s) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s = DURATION_MAX_s;
|
||||
if(_EEPROM_Content.Jam_Light_Configuration.Durations.Max <= _EEPROM_Content.Jam_Light_Configuration.Durations.Min) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Durations.Max = DURATION_MAX_s;
|
||||
}
|
||||
|
||||
while(_EEPROM_Content.Jam_Light_Configuration.Hue_Angle_Start_Color < 0) {
|
||||
@@ -205,25 +223,17 @@ void EEPROM_Check_Content_Valid()
|
||||
|
||||
_EEPROM_Content.Jam_Light_Configuration.Hue_Angle_Start_Color %= HUE_MAX_ANGLE;
|
||||
|
||||
if(_EEPROM_Content.Jam_Light_Configuration.Color_Change > COLOR_CHANGE_MAX) {
|
||||
if((uint32_t)_EEPROM_Content.Jam_Light_Configuration.Color_Change > COLOR_CHANGE_MAX) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Color_Change = COLOR_CHANGE_MIN;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Jam_Light_Configuration.Fade_Speed > FADE_SPEED_MAX) {
|
||||
if((uint32_t)_EEPROM_Content.Jam_Light_Configuration.Fade_Speed > FADE_SPEED_MAX) {
|
||||
_EEPROM_Content.Jam_Light_Configuration.Fade_Speed = FADE_SPEED_MIN;
|
||||
}
|
||||
|
||||
// Const Color no need, as full range of UINT8 is valid
|
||||
|
||||
if(_EEPROM_Content.Const_Light_Configuration.Fade_Speed > FADE_SPEED_MAX) {
|
||||
if((uint32_t)_EEPROM_Content.Const_Light_Configuration.Fade_Speed > FADE_SPEED_MAX) {
|
||||
_EEPROM_Content.Const_Light_Configuration.Fade_Speed = FADE_SPEED_MIN;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Device_Configuration.Transition_Type >= 0) {
|
||||
_EEPROM_Content.Device_Configuration.Transition_Type = 0;
|
||||
}
|
||||
|
||||
if(_EEPROM_Content.Device_Configuration.Transition_Frames == 0) {
|
||||
_EEPROM_Content.Device_Configuration.Transition_Frames = 16;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user