Skip to content

Commit

Permalink
autosync
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 23, 2025
1 parent 2725da4 commit 8faf497
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions examples/SineWaveCAN/SineWaveCAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ void setup() {

void loop() {
pumpEvents(can_intf); // This is required on some platforms to handle incoming feedback CAN messages
// Note that on MCP2515-based platforms, this will delay for a fixed 10ms.
// This has been found to reduce the number of dropped messages, however it can be removed
// for applications requiring loop times over 100Hz.

float SINE_PERIOD = 2.0f; // Period of the position command sine wave in seconds

Expand Down
1 change: 1 addition & 0 deletions src/ODriveEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ enum ODriveThermistorMode {
THERMISTOR_MODE_QUADRATIC = 2,
THERMISTOR_MODE_PT1000 = 3,
THERMISTOR_MODE_KTY84 = 4,
THERMISTOR_MODE_KTY83_122 = 5,
};

// ODrive.Can.Error
Expand Down
4 changes: 2 additions & 2 deletions src/ODriveMCPCAN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ static void onReceive(const CanMsg& msg, ODriveCAN& odrive) {
static void pumpEvents(MCP2515Class& intf) {
// On other platforms, this polls and processes incoming CAN messages.
// However, this is not possible on MCP2515-based platforms.

//
// A 10ms delay was found to reduce the number of dropped messages, however a
// specific root cause has not been identified, and may be a quirk in the MCP2515.
delay(10);
delay(10);
}

CREATE_CAN_INTF_WRAPPER(MCP2515Class)

0 comments on commit 8faf497

Please sign in to comment.