Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
wizmo2 committed Sep 29, 2023
1 parent e6afaf7 commit cfc31f9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/platform_console/cmd_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ static void register_bt_source_config(void){
}

void register_rotary_config(void){
if (!is_rotary_config_locked()){
if (is_rotary_config_locked()){
return;
}
rotary_args.rem = arg_rem("remark","One rotary encoder is supported, quadrature shift with press. Such encoders usually have 2 pins for encoders (A and B), and common C that must be set to ground and an optional SW pin for press. A, B and SW must be pulled up, so automatic pull-up is provided by ESP32, but you can add your own resistors. A bit of filtering on A and B (~470nF) helps for debouncing which is not made by software.\r\nEncoder is normally hard-coded to respectively knob left, right and push on LMS and to volume down/up/play toggle on BT and AirPlay.");
Expand Down
4 changes: 2 additions & 2 deletions components/services/accessors.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ bool is_display_config_locked(){
}

bool is_rotary_config_locked(){
#if ( defined CONFIG_ROTARY_CONFIG )
if(strlen(CONFIG_ROTARY_CONFIG) > 0){
#if ( defined CONFIG_ROTARY_ENCODER )
if(strlen(CONFIG_ROTARY_ENCODER) > 0){
return true;
}
#endif
Expand Down
3 changes: 3 additions & 0 deletions main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ menu "Squeezelite-ESP32"
config LED_VU_CONFIG
string "led_vu_config"
default ""
config ROTARY_ENCODER
string "rotary_config"
default ""
config ETH_CONFIG
string "eth_config"
default ""
Expand Down
2 changes: 1 addition & 1 deletion merge_output.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:\Users\Mike\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:\Users\Mike\esp\esp-idf\components\esptool_py\esptool\esptool.py --chip esp32s3 merge_bin -o build/output.bin --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 build/bootloader/bootloader.bin 0x10000 build/recovery.bin 0x8000 build/partition_table/partition-table.bin 0xd000 build/ota_data_initial.bin 0x150000 build/squeezelite.bin
C:\Users\Mike\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:\Users\Mike\esp\esp-idf\components\esptool_py\esptool\esptool.py --chip esp32s3 merge_bin -o build/output.bin --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 build/bootloader/bootloader.bin 0x10000 build/recovery.bin 0x8000 build/partition_table/partition-table.bin 0xd000 build/ota_data_initial.bin 0x150000 build/squeezelite.bin
2 changes: 1 addition & 1 deletion sdkconfig
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ CONFIG_GPIO_EXP_CONFIG=""
CONFIG_SPI_CONFIG="data=11,clk=12,dc=13,host=1"
CONFIG_DISPLAY_CONFIG="SPI,width=320,height=170,cs=10,reset=9,back=15,speed=8000000,mode=0,driver=ST7789:x=35,VFlip,rotate"
CONFIG_LED_VU_CONFIG="type=APA102,length=7,gpio=42,clk=45"
CONFIG_ROTARY_ENCODER="A=1,B=2,SW=0"
CONFIG_ETH_CONFIG=""
CONFIG_DAC_CONTROLSET=""
CONFIG_AUDIO_CONTROLS=""
Expand Down Expand Up @@ -272,7 +273,6 @@ CONFIG_A2DP_CONNECT_TIMEOUT_MS=1000
# Various I/O
#
CONFIG_I2C_CONFIG=""
CONFIG_ROTARY_ENCODER="A=1,B=2,SW=0"
# end of Various I/O

#
Expand Down

0 comments on commit cfc31f9

Please sign in to comment.