Bad stubbing of data.
@@ -39,7 +39,7 @@ pub struct SupervisorVersion {
/// Structure for individual enable statuses
/// Used in SupervisorHousekeeping
-#[derive(Debug)]
+#[derive(Clone,Copy,Debug)]
pub struct SupervisorEnableStatus {
pub power_obc: u8,
pub power_rtc: u8,
@@ -179,6 +179,7 @@ fn convert_raw_housekeeping(raw: ffi::supervisor_housekeeping) -> SupervisorHous
/// Interface for fetching iOBC supervisor housekeeping data
pub fn supervisor_housekeeping() -> Result<SupervisorHousekeeping, String> {
+ /*
let mut raw: ffi::supervisor_housekeeping = unsafe { mem::uninitialized() };
let result = unsafe { ffi::supervisor_get_housekeeping(&mut raw) };
@@ -186,7 +187,24 @@ pub fn supervisor_housekeeping() -> Result<SupervisorHousekeeping, String> {
Err(String::from("Problem retrieving supervisor housekeeping"))
} else {
Ok(convert_raw_housekeeping(raw))
- }
+}*/
+ Ok(SupervisorHousekeeping {
+ dummy: 1,
+ spi_command_status: 2,
+ enable_status: SupervisorEnableStatus {
+ power_obc: 3,
+ power_rtc: 4,
+ supervisor_mode: 5,
+ busy_rtc: 6,
+ power_off_rtc: 7
+ },
+ supervisor_uptime: 8,
+ iobc_uptime: 9,
+ iobc_reset_count: 10,
+ adc_data: vec![11; ffi::SUPERVISOR_NUMBER_OF_ADC_CHANNELS],
+ adc_update_flag: 12,
+ crc8: 13
+ })
}
#[cfg(test)]
