Skip to content

Commit 071e16b

Browse files
committed
revert back to origin main.cpp
1 parent 0b4eb1f commit 071e16b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ static int rt_thread_epoll_fd; /*!< epoll file descriptor for rt thread */
5151
static int rtControlPriority = 80; /*!< priority of application thread */
5252
static void *rt_control_thread(void *arg);
5353
static pthread_t rt_control_thread_id;
54-
const float controlLoopPeriodInms = 3; /*!< Define the control loop period (in ms): the period of rt_control_thread loop. */
55-
const float CANUpdateLoopPeriodInms = 3; /*!< Define the CAN PDO sync message period (and so PDO update rate). In ms. Less than 3 can lead to unstable communication */
54+
const float controlLoopPeriodInms = 10; /*!< Define the control loop period (in ms): the period of rt_control_thread loop. */
55+
const float CANUpdateLoopPeriodInms = 10; /*!< Define the CAN PDO sync message period (and so PDO update rate). In ms. Less than 3 can lead to unstable communication */
5656
CO_NMT_reset_cmd_t reset_local = CO_RESET_NOT;
5757

5858
/** @brief Task Timer used for the Control Loop*/
@@ -191,7 +191,7 @@ int main(int argc, char *argv[]) {
191191
spdlog::info("Starting CANopen device with Node ID {}", nodeId);
192192

193193
//Set synch signal period (in us)
194-
CO_OD_RAM.communicationCyclePeriod = CANUpdateLoopPeriodInms * 2000;
194+
CO_OD_RAM.communicationCyclePeriod = CANUpdateLoopPeriodInms * 1000;
195195

196196
while (reset != CO_RESET_APP && reset != CO_RESET_QUIT && endProgram == 0) {
197197
/* CANopen communication reset || first run of app- initialize CANopen objects *******************/

0 commit comments

Comments
 (0)