@@ -10,7 +10,6 @@ use core::ops::BitOr;
1010use bitvec:: prelude:: * ;
1111#[ allow( unused_imports) ]
1212use embedded_can:: { Id , StandardId , ExtendedId } ;
13- use core:: time:: Duration ;
1413/// All messages
1514#[ allow(
1615 clippy:: absurd_extreme_comparisons,
@@ -89,7 +88,7 @@ impl DriverHeartbeat {
8988 StandardId :: new_unchecked ( 0x64 )
9089 } ) ;
9190 pub const MESSAGE_SIZE : usize = 1 ;
92- pub const MESSAGE_CYCLE_TIME : Duration = Duration :: from_millis ( 1000 ) ;
91+ pub const MESSAGE_CYCLE_TIME_MS : u32 = 1000 ;
9392 pub const DRIVER_HEARTBEAT_CMD_MIN : u8 = 0_u8 ;
9493 pub const DRIVER_HEARTBEAT_CMD_MAX : u8 = 0_u8 ;
9594 /// Construct new DRIVER_HEARTBEAT from values
@@ -243,7 +242,7 @@ impl IoDebug {
243242 StandardId :: new_unchecked ( 0x1f4 )
244243 } ) ;
245244 pub const MESSAGE_SIZE : usize = 4 ;
246- pub const MESSAGE_CYCLE_TIME : Duration = Duration :: from_millis ( 100 ) ;
245+ pub const MESSAGE_CYCLE_TIME_MS : u32 = 100 ;
247246 pub const IO_DEBUG_TEST_FLOAT_MIN : f32 = 0_f32 ;
248247 pub const IO_DEBUG_TEST_FLOAT_MAX : f32 = 0_f32 ;
249248 pub const IO_DEBUG_TEST_SIGNED_MIN : i8 = 0_i8 ;
@@ -529,7 +528,7 @@ impl MotorCmd {
529528 StandardId :: new_unchecked ( 0x65 )
530529 } ) ;
531530 pub const MESSAGE_SIZE : usize = 1 ;
532- pub const MESSAGE_CYCLE_TIME : Duration = Duration :: from_millis ( 100 ) ;
531+ pub const MESSAGE_CYCLE_TIME_MS : u32 = 100 ;
533532 pub const MOTOR_CMD_DRIVE_MIN : u8 = 0_u8 ;
534533 pub const MOTOR_CMD_DRIVE_MAX : u8 = 9_u8 ;
535534 pub const MOTOR_CMD_STEER_MIN : i8 = -5_i8 ;
@@ -693,7 +692,7 @@ impl MotorStatus {
693692 StandardId :: new_unchecked ( 0x190 )
694693 } ) ;
695694 pub const MESSAGE_SIZE : usize = 3 ;
696- pub const MESSAGE_CYCLE_TIME : Duration = Duration :: from_millis ( 100 ) ;
695+ pub const MESSAGE_CYCLE_TIME_MS : u32 = 100 ;
697696 pub const MOTOR_STATUS_SPEED_KPH_MIN : f32 = 0_f32 ;
698697 pub const MOTOR_STATUS_SPEED_KPH_MAX : f32 = 0_f32 ;
699698 /// Construct new MOTOR_STATUS from values
@@ -841,7 +840,7 @@ impl SensorSonars {
841840 StandardId :: new_unchecked ( 0xc8 )
842841 } ) ;
843842 pub const MESSAGE_SIZE : usize = 8 ;
844- pub const MESSAGE_CYCLE_TIME : Duration = Duration :: from_millis ( 100 ) ;
843+ pub const MESSAGE_CYCLE_TIME_MS : u32 = 100 ;
845844 pub const SENSOR_SONARS_NO_FILT_REAR_MIN : f32 = 0_f32 ;
846845 pub const SENSOR_SONARS_NO_FILT_REAR_MAX : f32 = 0_f32 ;
847846 pub const SENSOR_SONARS_REAR_MIN : f32 = 0_f32 ;
0 commit comments