Skip to content

Commit e4ba4ed

Browse files
committed
Tue Jan 12 15:54:13 EST 2021 - fix brightness bug
1 parent 5cf88e2 commit e4ba4ed

File tree

7 files changed

+44
-15
lines changed

7 files changed

+44
-15
lines changed

Assets/retro-esp32/logos/logo.gif

-1.1 KB
Loading

Emulators/handy-go/components/odroid/odroid_hud.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const uint16_t FONT_5x7[7][250] = {
179179

180180
};
181181

182-
#define BUILD "v.2.8"
182+
#define BUILD "v.2.7"
183183
const uint16_t logo[12][64] = {
184184
{0,0,0,0,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0},
185185
{0,0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,65535,0,0},

Launchers/retro-esp32/components/odroid/odroid_display.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,25 @@
2626

2727
const int DUTY_MAX = 0x1fff;
2828

29+
///*
2930
const gpio_num_t SPI_PIN_NUM_MISO = GPIO_NUM_19;
3031
const gpio_num_t SPI_PIN_NUM_MOSI = GPIO_NUM_23;
3132
const gpio_num_t SPI_PIN_NUM_CLK = GPIO_NUM_18;
3233

3334
const gpio_num_t LCD_PIN_NUM_CS = GPIO_NUM_5;
3435
const gpio_num_t LCD_PIN_NUM_DC = GPIO_NUM_21;
3536
const gpio_num_t LCD_PIN_NUM_BCKL = GPIO_NUM_14;
37+
//*/
38+
39+
/*
40+
const gpio_num_t SPI_PIN_NUM_MISO = GPIO_NUM_19;
41+
const gpio_num_t SPI_PIN_NUM_MOSI = GPIO_NUM_23;
42+
const gpio_num_t SPI_PIN_NUM_CLK = GPIO_NUM_18;
43+
44+
const gpio_num_t LCD_PIN_NUM_CS = GPIO_NUM_14;
45+
const gpio_num_t LCD_PIN_NUM_DC = GPIO_NUM_27;
46+
const gpio_num_t LCD_PIN_NUM_BCKL = GPIO_NUM_32;
47+
*/
3648

3749
const int LCD_BACKLIGHT_ON_VALUE = 1;
3850
const int LCD_SPI_CLOCK_RATE = SPI_MASTER_FREQ_40M;

Launchers/retro-esp32/components/odroid/odroid_settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ int32_t odroid_settings_Volume_get()
174174
err = nvs_get_i32(my_handle, NvsKey_Volume, &result);
175175
if (err == ESP_OK)
176176
{
177-
//printf("odroid_settings_Volume_get: value=%d\n", result);
177+
printf("odroid_settings_Volume_get: value=%d\n", result);
178178
}
179179

180180
// Close

Launchers/retro-esp32/main/main.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,24 @@
669669
BRIGHTNESS = get_brightness();
670670
int duty = DUTY_MAX * (BRIGHTNESS_LEVELS[BRIGHTNESS] * 0.01f);
671671

672-
672+
if(is_backlight_initialized()) {
673+
currentDuty = ledc_get_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0);
674+
if (currentDuty != duty) {
675+
//ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, currentDuty);
676+
//ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0);
677+
//ledc_set_fade_with_time(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, duty, 1000);
678+
//ledc_fade_start(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, LEDC_FADE_WAIT_DONE /*LEDC_FADE_NO_WAIT|LEDC_FADE_WAIT_DONE|LEDC_FADE_MAX*/);
679+
//ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, duty);
680+
//ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0);
681+
ledc_set_fade_time_and_start(
682+
LEDC_LOW_SPEED_MODE,
683+
LEDC_CHANNEL_0,
684+
duty,
685+
25,
686+
LEDC_FADE_WAIT_DONE
687+
);
688+
}
689+
}
673690
}
674691
//}#pragma endregion Brightness
675692

Launchers/retro-esp32/sdkconfig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ CONFIG_FLASH_ENCRYPTION_ENABLED=
3838
#
3939
# Serial flasher config
4040
#
41-
CONFIG_ESPTOOLPY_PORT="/dev/cu.usbserial-AB0JESEO"
41+
CONFIG_ESPTOOLPY_PORT="/dev/cu.SLAB_USBtoUART"
4242
CONFIG_ESPTOOLPY_BAUD_115200B=
4343
CONFIG_ESPTOOLPY_BAUD_230400B=
4444
CONFIG_ESPTOOLPY_BAUD_921600B=
@@ -84,20 +84,20 @@ CONFIG_MONITOR_BAUD=115200
8484
# Retro ESP32 Configuration
8585
#
8686
CONFIG_LCD_DRIVER_CHIP_CUTE_ESP32=
87-
CONFIG_LCD_DRIVER_CHIP_ODROID_GO=
87+
CONFIG_LCD_DRIVER_CHIP_ODROID_GO=y
8888
CONFIG_LCD_DRIVER_CHIP_RETRO_ESP32=
89-
CONFIG_LCD_DRIVER_CHIP_RETRO_ESP32_NEXT=y
90-
CONFIG_DEFAULT_MENU_KEY=
91-
CONFIG_COMBO_MENU_KEY=y
89+
CONFIG_LCD_DRIVER_CHIP_RETRO_ESP32_NEXT=
90+
CONFIG_DEFAULT_MENU_KEY=y
91+
CONFIG_COMBO_MENU_KEY=
9292

9393
#
9494
# Partition Table
9595
#
96-
CONFIG_PARTITION_TABLE_SINGLE_APP=y
96+
CONFIG_PARTITION_TABLE_SINGLE_APP=
9797
CONFIG_PARTITION_TABLE_TWO_OTA=
98-
CONFIG_PARTITION_TABLE_CUSTOM=
98+
CONFIG_PARTITION_TABLE_CUSTOM=y
9999
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
100-
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
100+
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
101101
CONFIG_PARTITION_TABLE_OFFSET=0x8000
102102
CONFIG_PARTITION_TABLE_MD5=y
103103

Launchers/retro-esp32/sdkconfig.old

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ CONFIG_FLASH_ENCRYPTION_ENABLED=
3838
#
3939
# Serial flasher config
4040
#
41-
CONFIG_ESPTOOLPY_PORT="/dev/cu.usbserial-AB0JESEO"
41+
CONFIG_ESPTOOLPY_PORT="/dev/cu.SLAB_USBtoUART"
4242
CONFIG_ESPTOOLPY_BAUD_115200B=
4343
CONFIG_ESPTOOLPY_BAUD_230400B=
4444
CONFIG_ESPTOOLPY_BAUD_921600B=
@@ -93,11 +93,11 @@ CONFIG_COMBO_MENU_KEY=y
9393
#
9494
# Partition Table
9595
#
96-
CONFIG_PARTITION_TABLE_SINGLE_APP=y
96+
CONFIG_PARTITION_TABLE_SINGLE_APP=
9797
CONFIG_PARTITION_TABLE_TWO_OTA=
98-
CONFIG_PARTITION_TABLE_CUSTOM=
98+
CONFIG_PARTITION_TABLE_CUSTOM=y
9999
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
100-
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
100+
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
101101
CONFIG_PARTITION_TABLE_OFFSET=0x8000
102102
CONFIG_PARTITION_TABLE_MD5=y
103103

0 commit comments

Comments
 (0)