diff --git a/firmware/platformio.ini b/firmware/platformio.ini index 71e30e1..f4c3800 100644 --- a/firmware/platformio.ini +++ b/firmware/platformio.ini @@ -8,6 +8,9 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html +[platformio] +default_envs = view + [base_config] platform = espressif32@3.4 framework = arduino @@ -24,50 +27,6 @@ lib_deps = build_flags = -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -[env:proto] -extends = base_config -board = esp32doit-devkit-v1 -lib_deps = - ${base_config.lib_deps} - bodmer/TFT_eSPI@2.4.25 - -build_flags = - ${base_config.build_flags} - -DSK_DISPLAY=1 - - -DPIN_UH=27 - -DPIN_UL=26 - -DPIN_VH=25 - -DPIN_VL=33 - -DPIN_WH=32 - -DPIN_WL=13 - -DPIN_BUTTON_NEXT=36 - -DPIN_BUTTON_PREV=-1 - -DPIN_SDA=-1 - -DPIN_SCL=-1 - -DSENSOR_MT6701=1 - - -DDESCRIPTION_FONT=Roboto_Thin_24 - -DDESCRIPTION_Y_OFFSET=20 - -DVALUE_OFFSET=30 - -DDRAW_ARC=0 - - -DUSER_SETUP_LOADED=1 - -DGC9A01_DRIVER=1 - -DCGRAM_OFFSET=1 - -DTFT_WIDTH=240 - -DTFT_HEIGHT=240 - -DTFT_MISO=-1 - -DTFT_MOSI=19 - -DTFT_SCLK=18 - -DTFT_CS=5 - -DTFT_DC=16 - -DTFT_RST=23 - -DTFT_BL=4 - -DLOAD_GLCD=1 - -DLOAD_GFXFF=1 - -DSPI_FREQUENCY=40000000 - [env:view] extends = base_config ; platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream @@ -109,8 +68,6 @@ build_flags = -DPIN_LED_DATA=7 -DPIN_LCD_BACKLIGHT=19 - -DLEDC_CHANNEL_LCD_BACKLIGHT=0 - -DDESCRIPTION_FONT=Roboto_Thin_24 -DDESCRIPTION_Y_OFFSET=20 -DVALUE_OFFSET=30 @@ -147,26 +104,6 @@ build_flags = ; (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | _FL_BIT(34) | _FL_BIT(35) | _FL_BIT(36) | _FL_BIT(37) | _FL_BIT(38) | _FL_BIT(39))) -DSOC_GPIO_VALID_OUTPUT_GPIO_MASK=0x30EFFFFFF - -[env:handheld] -extends = base_config -board = tinypico - -build_flags = - ${base_config.build_flags} - -DSK_DISPLAY=0 - - -DPIN_UH=25 - -DPIN_UL=26 - -DPIN_VH=27 - -DPIN_VL=15 - -DPIN_WH=14 - -DPIN_WL=4 - -DPIN_BUTTON_NEXT=23 - -DPIN_BUTTON_PREV=-1 - -DPIN_SDA=33 - -DPIN_SCL=32 - -DSENSOR_TLV=1 [env:handheld_tdisplay] extends = base_config @@ -195,6 +132,7 @@ build_flags = -DPIN_MT_DATA=21 -DPIN_MT_CLOCK=22 -DPIN_MT_CSN=12 + -DPIN_LCD_BACKLIGHT=4 -DDESCRIPTION_FONT=FreeSans9pt7b -DDESCRIPTION_Y_OFFSET=80 @@ -212,7 +150,7 @@ build_flags = -DTFT_CS=5 -DTFT_DC=16 -DTFT_RST=23 - -DTFT_BL=4 + -DTFT_BL=-1 -DLOAD_GLCD=1 -DLOAD_GFXFF=1 -DSPI_FREQUENCY=40000000 \ No newline at end of file diff --git a/firmware/src/display_task.cpp b/firmware/src/display_task.cpp index 7bc027e..1f2f4ba 100644 --- a/firmware/src/display_task.cpp +++ b/firmware/src/display_task.cpp @@ -4,6 +4,8 @@ #include "font/roboto_light_60.h" +static const uint8_t LEDC_CHANNEL_LCD_BACKLIGHT = 0; + DisplayTask::DisplayTask(const uint8_t task_core) : Task{"Display", 4048, 1, task_core} { knob_state_queue_ = xQueueCreate(1, sizeof(KnobState)); assert(knob_state_queue_ != NULL); diff --git a/firmware/src/mt6701_sensor.cpp b/firmware/src/mt6701_sensor.cpp index 1756995..8506a88 100644 --- a/firmware/src/mt6701_sensor.cpp +++ b/firmware/src/mt6701_sensor.cpp @@ -34,7 +34,7 @@ static uint8_t CRC6_43_18bit (uint32_t w_InputData) return b_CRC; } - +#if SENSOR_MT6701 MT6701Sensor::MT6701Sensor() {} @@ -116,3 +116,5 @@ float MT6701Sensor::getSensorAngle() { } return rad; } + +#endif \ No newline at end of file