Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/CAN
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2021-01-07 13:00:25 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-01-07 13:00:25 +0300
commit1bcfdbd5364a1fdfde135b0873b1ff5e536a76ba (patch)
treeb0cfb671862efad4d67a40238786f47f5cc23bc1 /src/CAN
parentd47dfa59e64f60bd033b6768d6af0680933c258b (diff)
Various
Fixed issues with updating expansion boards when or CAN address is not 0 Added M122 P108 to measure the time taken to read the step clock
Diffstat (limited to 'src/CAN')
-rw-r--r--src/CAN/ExpansionManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CAN/ExpansionManager.cpp b/src/CAN/ExpansionManager.cpp
index fe8f88f3..cf09fe69 100644
--- a/src/CAN/ExpansionManager.cpp
+++ b/src/CAN/ExpansionManager.cpp
@@ -141,7 +141,7 @@ void ExpansionManager::ProcessAnnouncement(CanMessageBuffer *buf) noexcept
}
UpdateBoardState(src, BoardState::running);
}
- buf->SetupResponseMessage<CanMessageAcknowledgeAnnounce>(0, CanId::MasterAddress, src);
+ buf->SetupResponseMessage<CanMessageAcknowledgeAnnounce>(0, CanInterface::GetCanAddress(), src);
CanInterface::SendResponseNoFree(buf);
}
@@ -166,7 +166,7 @@ GCodeResult ExpansionManager::UpdateRemoteFirmware(uint32_t boardAddress, GCodeB
// Ask the board for its type and check we have the firmware file for it
CanMessageBuffer * const buf1 = CanInterface::AllocateBuffer(&gb);
CanRequestId rid1 = CanInterface::AllocateRequestId(boardAddress);
- auto msg1 = buf1->SetupRequestMessage<CanMessageReturnInfo>(rid1, CanId::MasterAddress, (CanAddress)boardAddress);
+ auto msg1 = buf1->SetupRequestMessage<CanMessageReturnInfo>(rid1, CanInterface::GetCanAddress(), (CanAddress)boardAddress);
msg1->type = (moduleNumber == (unsigned int)FirmwareModule::bootloader) ? CanMessageReturnInfo::typeBootloaderName : CanMessageReturnInfo::typeBoardName;
{
@@ -201,7 +201,7 @@ GCodeResult ExpansionManager::UpdateRemoteFirmware(uint32_t boardAddress, GCodeB
CanMessageBuffer * const buf2 = CanInterface::AllocateBuffer(&gb);
const CanRequestId rid2 = CanInterface::AllocateRequestId(boardAddress);
- auto msg2 = buf2->SetupRequestMessage<CanMessageUpdateYourFirmware>(rid2, CanId::MasterAddress, (CanAddress)boardAddress);
+ auto msg2 = buf2->SetupRequestMessage<CanMessageUpdateYourFirmware>(rid2, CanInterface::GetCanAddress(), (CanAddress)boardAddress);
msg2->boardId = (uint8_t)boardAddress;
msg2->invertedBoardId = (uint8_t)~boardAddress;
msg2->module = moduleNumber;