Skip to content

Commit

Permalink
Remove devcontainer, update PCA9685 & protobuf RPC configs
Browse files Browse the repository at this point in the history
  • Loading branch information
sfxfs committed Dec 24, 2024
1 parent c9a4484 commit 254e277
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 101 deletions.
47 changes: 0 additions & 47 deletions .devcontainer/Dockerfile

This file was deleted.

36 changes: 0 additions & 36 deletions .devcontainer/devcontainer.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/
.devcontainer/
build/
sdkconfig
sdkconfig.old
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## 编译

本项目使用 VSCode 进行开发,请提前安装 `esp-idf` 插件。首次克隆项目后,请使用插件生成 `.vscode` 目录,以确保代码查错功能正常。可以直接通过插件进行项目的编译和烧录。
本项目要求的 `esp-idf` 最低版本为 `v5.3.2`,推荐使用 VSCode 进行开发,请提前安装 `esp-idf` 插件。首次克隆项目后,请使用插件生成 `.vscode` 目录,以确保代码查错功能正常。可以直接通过插件进行项目的编译和烧录。

## 开发

Expand Down
6 changes: 3 additions & 3 deletions components/pca9685/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ menu "SUB:PCA9685"

config SUB_ENABLE_PCA9685
bool "Enable PCA9685 peripheral"
default n
default y
help
PCA9685 is a I2C based 16-channel PWM controller.

Expand All @@ -16,11 +16,11 @@ menu "SUB:PCA9685"
config SUB_PCA9685_IIC_ADDRESS
hex "Set PCA9685 IIC address"
range 0 0x7f # 7bit address
default 0x3B
default 0x40

config SUB_PCA9685_IIC_FREQUENCY
int "Set PCA9685 IIC freq"
range 100000 400000
range 100000 1000000
default 400000

config SUB_PCA9685_IIC_TIMEOUT
Expand Down
2 changes: 1 addition & 1 deletion components/pca9685/pca9685_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ uint8_t pca9685_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uin
if (NULL == temp_buf)
return 1;

temp_buf[0] = addr;
temp_buf[0] = reg;
memcpy(&temp_buf[1], buf, len);

esp_err_t ret = i2c_master_transmit(pca9685_i2c_dev_handle, temp_buf, len + 1, CONFIG_SUB_PCA9685_IIC_TIMEOUT);
Expand Down
20 changes: 10 additions & 10 deletions components/protobuf_rpc/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ menu "SUB:ProtoBuf-RPC"
menu "Interface"
config SUB_PROTOBUF_UART_PORT
int "Which UARTx will be used"
default 0
default 2
help
The interface that used to communicate with sub-navi.

Expand All @@ -20,20 +20,20 @@ menu "SUB:ProtoBuf-RPC"

config SUB_PROTOBUF_UART_CUSTOM_PINS
bool "Use custom pins"
default n
default y
help
If you want to use custom pins for UARTx, enable this option.

if SUB_PROTOBUF_UART_CUSTOM_PINS
config SUB_PROTOBUF_UART_TX_PIN
int "UARTx TX pin"
default 17
default 37
help
The TX pin of UARTx.

config SUB_PROTOBUF_UART_RX_PIN
int "UARTx RX pin"
default 16
default 36
help
The RX pin of UARTx.
endif
Expand All @@ -42,19 +42,19 @@ menu "SUB:ProtoBuf-RPC"
menu "Thruster"
config SUB_PROTOBUF_THRUSTER0_PIN
int "Thruster0 pin"
default 18
default 27
help
The pin of thruster channel 0.

config SUB_PROTOBUF_THRUSTER1_PIN
int "Thruster1 pin"
default 19
default 26
help
The pin of thruster channel 1.

config SUB_PROTOBUF_THRUSTER2_PIN
int "Thruster2 pin"
default 20
default 25
help
The pin of thruster channel 2.

Expand All @@ -72,19 +72,19 @@ menu "SUB:ProtoBuf-RPC"

config SUB_PROTOBUF_THRUSTER5_PIN
int "Thruster5 pin"
default 23
default 19
help
The pin of thruster channel 5.

config SUB_PROTOBUF_THRUSTER6_PIN
int "Thruster6 pin"
default 24
default 23
help
The pin of thruster channel 6.

config SUB_PROTOBUF_THRUSTER7_PIN
int "Thruster7 pin"
default 25
default 18
help
The pin of thruster channel 7.
endmenu
Expand Down
6 changes: 3 additions & 3 deletions components/sub_bus_init/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ menu "SUB:Bus Interface"
menu "I2C0 Config"
config SUB_ENABLE_I2C0
bool "Enable interface"
default n
default y

if SUB_ENABLE_I2C0
config SUB_I2C0_SCL_PIN
int "Set SCL pin num"
default 6
default 17

config SUB_I2C0_SDA_PIN
int "Set SDA pin num"
default 7
default 5
endif
endmenu

Expand Down

0 comments on commit 254e277

Please sign in to comment.