Skip to content

Commit 0bc5dab

Browse files
committed
regenerate messages.rs
1 parent 758874c commit 0bc5dab

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

testing/can-messages/src/messages.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ impl Bar {
180180
pub const MESSAGE_ID: u32 = 512;
181181

182182
/// Construct new Bar from values
183-
pub fn new(one: u8, two: f32, three: u8, four: u8, five: bool) -> Result<Self, CanError> {
183+
pub fn new(one: u8, two: f32, three: u8, four: u8, xtype: bool) -> Result<Self, CanError> {
184184
let mut res = Self { raw: [0u8; 8] };
185185
res.set_one(one)?;
186186
res.set_two(two)?;
187187
res.set_three(three)?;
188188
res.set_four(four)?;
189-
res.set_five(five)?;
189+
res.set_xtype(xtype)?;
190190
Ok(res)
191191
}
192192

@@ -369,24 +369,24 @@ impl Bar {
369369
Ok(())
370370
}
371371

372-
/// Five
372+
/// Type
373373
///
374374
/// - Min: 0
375375
/// - Max: 1
376376
/// - Unit: "boolean"
377377
/// - Receivers: Dolor
378378
#[inline(always)]
379-
pub fn five(&self) -> BarFive {
380-
match self.five_raw() {
381-
false => BarFive::X0off,
382-
true => BarFive::X1on,
383-
false => BarFive::X2oner,
384-
false => BarFive::X3onest,
385-
x => BarFive::Other(x),
379+
pub fn xtype(&self) -> BarType {
380+
match self.xtype_raw() {
381+
false => BarType::X0off,
382+
true => BarType::X1on,
383+
false => BarType::X2oner,
384+
false => BarType::Type,
385+
x => BarType::Other(x),
386386
}
387387
}
388388

389-
/// Get raw value of Five
389+
/// Get raw value of Type
390390
///
391391
/// - Start bit: 30
392392
/// - Signal size: 1 bits
@@ -395,15 +395,15 @@ impl Bar {
395395
/// - Byte order: BigEndian
396396
/// - Value type: Unsigned
397397
#[inline(always)]
398-
pub fn five_raw(&self) -> bool {
398+
pub fn xtype_raw(&self) -> bool {
399399
let signal = u8::unpack_be_bits(&self.raw, (30 - (1 - 1)), 1);
400400

401401
signal == 1
402402
}
403403

404-
/// Set value of Five
404+
/// Set value of Type
405405
#[inline(always)]
406-
pub fn set_five(&mut self, value: bool) -> Result<(), CanError> {
406+
pub fn set_xtype(&mut self, value: bool) -> Result<(), CanError> {
407407
let value = value as u8;
408408
let start_bit = 30;
409409
let bits = 1;
@@ -446,14 +446,14 @@ pub enum BarFour {
446446
Onest,
447447
Other(u8),
448448
}
449-
/// Defined values for Five
449+
/// Defined values for Type
450450
#[derive(Clone, Copy, PartialEq)]
451451
#[cfg_attr(feature = "debug", derive(Debug))]
452-
pub enum BarFive {
452+
pub enum BarType {
453453
X0off,
454454
X1on,
455455
X2oner,
456-
X3onest,
456+
Type,
457457
Other(bool),
458458
}
459459

0 commit comments

Comments
 (0)