Skip to content

Commit

Permalink
use espidf and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gcormier committed Nov 1, 2023
1 parent d101f2e commit e1840cc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
27 changes: 17 additions & 10 deletions esphome/megadesk-companion.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# If you get errors compiling this with esphome, make sure you are on a recent version.
# 'esphome version' will output the version you are on.
#
# If you want to compile in the Home Assistant esphome addon, you need to copy megadesk.h into your esphome folder
# on your Home Assistant platform.

esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
# If you are running the latest version of esphome (2023.5.4 or later)
# you might not need the following lines
# latest stable via pip at this time (2022.9.4) requires these 2 lines
version: 2.0.9
platform_version: https://github.com/platformio/platform-espressif32.git#v5.3.0
type: esp-idf
version: recommended

esphome:
name: megadesk
comment: megadesk-companion
platformio_options:
board_build.flash_mode: dio # If you don't specify this using esp-idf framework, the device will boot-loop.
includes:
- megadesk.h
on_boot:
Expand All @@ -25,7 +29,10 @@ esphome:

#####
# You need to make sure tx_pin and rx_pin are set properly for your device.
# When in doubt, try swapping them in case of a mixup on RX/TX.
# For 5-pin Megadesks, this will not need changing.
#
# If you have a 3-pin megadesk, try swapping them in case of a mixup on RX/TX
# when you soldered the wires.
#####
uart:
id: uart_desk
Expand All @@ -34,7 +41,7 @@ uart:
rx_pin: GPIO7

logger:
baud_rate: 0
hardware_uart: USB_SERIAL_JTAG # Logging over the USB-C port (WiFi will always log as well)

api:
password: ""
Expand All @@ -47,8 +54,8 @@ wifi:
password: !secret wifi_password

ap:
ssid: "Desk Fallback Hotspot"
password: "xxxxxxxxxx"
ssid: "Megadesk Fallback"
password: "megadesk"

captive_portal:

Expand Down
2 changes: 1 addition & 1 deletion esphome/megadesk.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Megadesk : public Component, public Sensor, public UARTDevice {
}
}

void parseData(byte command, uint16_t position, uint8_t push_addr)
void parseData(uint8_t command, uint16_t position, uint8_t push_addr)
{
if (command == '=')
{
Expand Down

0 comments on commit e1840cc

Please sign in to comment.