-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- base of protobuf rpc - method of pb ppc - refactor sub_bus_init with no global val
- Loading branch information
Showing
26 changed files
with
660 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
idf_component_register(SRCS "pb_rpc.c" "message_cmd.c" "navi_master.pb.c" | ||
INCLUDE_DIRS "include" | ||
PRIV_REQUIRES esp_driver_uart dshot pca9685 | ||
REQUIRES nanopb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
menu "SUB:ProtoBuf-RPC" | ||
menu "Interface" | ||
config SUB_PROTOBUF_UART_PORT | ||
int "Which UARTx will be used" | ||
default 0 | ||
help | ||
The interface that used to communicate with sub-navi. | ||
|
||
config SUB_PROTOBUF_UART_BAUDRATE | ||
int "Set UART baudrate" | ||
default 115200 | ||
help | ||
The baudrate of UARTx. | ||
|
||
config SUB_PROTOBUF_UART_QUEUE_SIZE | ||
int "Set UART queue size" | ||
default 20 | ||
help | ||
The queue size of UARTx. | ||
|
||
config SUB_PROTOBUF_UART_CUSTOM_PINS | ||
bool "Use custom pins" | ||
default n | ||
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 | ||
help | ||
The TX pin of UARTx. | ||
|
||
config SUB_PROTOBUF_UART_RX_PIN | ||
int "UARTx RX pin" | ||
default 16 | ||
help | ||
The RX pin of UARTx. | ||
endif | ||
endmenu | ||
|
||
menu "Thruster" | ||
config SUB_PROTOBUF_THRUSTER0_PIN | ||
int "Thruster0 pin" | ||
default 18 | ||
help | ||
The pin of thruster channel 0. | ||
|
||
config SUB_PROTOBUF_THRUSTER1_PIN | ||
int "Thruster1 pin" | ||
default 19 | ||
help | ||
The pin of thruster channel 1. | ||
|
||
config SUB_PROTOBUF_THRUSTER2_PIN | ||
int "Thruster2 pin" | ||
default 20 | ||
help | ||
The pin of thruster channel 2. | ||
|
||
config SUB_PROTOBUF_THRUSTER3_PIN | ||
int "Thruster3 pin" | ||
default 21 | ||
help | ||
The pin of thruster channel 3. | ||
|
||
config SUB_PROTOBUF_THRUSTER4_PIN | ||
int "Thruster4 pin" | ||
default 22 | ||
help | ||
The pin of thruster channel 4. | ||
|
||
config SUB_PROTOBUF_THRUSTER5_PIN | ||
int "Thruster5 pin" | ||
default 23 | ||
help | ||
The pin of thruster channel 5. | ||
|
||
config SUB_PROTOBUF_THRUSTER6_PIN | ||
int "Thruster6 pin" | ||
default 24 | ||
help | ||
The pin of thruster channel 6. | ||
|
||
config SUB_PROTOBUF_THRUSTER7_PIN | ||
int "Thruster7 pin" | ||
default 25 | ||
help | ||
The pin of thruster channel 7. | ||
endmenu | ||
|
||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef SUB_PB_RPC_CMD_H | ||
#define SUB_PB_RPC_CMD_H | ||
|
||
#include "navi_master.pb.h" | ||
|
||
// for main | ||
int message_cmd_init(void); | ||
|
||
// for component itself | ||
void message_thruster_cmd(ThrusterCommand *msg); | ||
void message_pwmDev_cmd(PWMDevCommand *msg); | ||
|
||
#endif //SUB_PB_RPC_CMD_H |
Oops, something went wrong.