Skip to content

Instantly share code, notes, and snippets.

@jmeggitt
Created October 17, 2018 06:47
Show Gist options
  • Save jmeggitt/3e009167d3a9c6553ca38d71f0157ebc to your computer and use it in GitHub Desktop.
Save jmeggitt/3e009167d3a9c6553ca38d71f0157ebc to your computer and use it in GitHub Desktop.
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:130:40
|
130 | self.board_id.hw_rev = config[NAVX_REG_HW_REV];
| ^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:131:46
|
131 | self.board_id.fw_ver_major = config[NAVX_REG_FW_VER_MAJOR];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:132:46
|
132 | self.board_id.fw_ver_minor = config[NAVX_REG_FW_VER_MINOR];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:133:39
|
133 | self.board_id.type_ = config[NAVX_REG_WHOAMI];
| ^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:136:47
|
136 | self.board_state.cal_status = config[NAVX_REG_CAL_STATUS];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:137:46
|
137 | self.board_state.op_status = config[NAVX_REG_OP_STATUS];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:138:52
|
138 | self.board_state.selftest_status = config[NAVX_REG_SELFTEST_STATUS];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:142:46
|
142 | registers::dec_prot_u16(&config[NAVX_REG_SENSOR_STATUS_L..]) as i16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:144:46
|
144 | registers::dec_prot_u16(&config[NAVX_REG_GYRO_FSR_DPS_L..]) as i16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:145:48
|
145 | self.board_state.accel_fsr_g = config[NAVX_REG_ACCEL_FSR_G] as i16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:146:51
|
146 | self.board_state.update_rate_hz = config[NAVX_REG_UPDATE_RATE_HZ];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:148:46
|
148 | registers::dec_prot_u16(&config[NAVX_REG_CAPABILITY_FLAGS_L..]) as i16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:179:77
|
179 | registers::dec_prot_u32(&curr_data[NAVX_REG_TIMESTAMP_L_L - first_address..])
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:179:75
|
179 | registers::dec_prot_u32(&curr_data[NAVX_REG_TIMESTAMP_L_L - first_address..])
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:179:42
|
179 | registers::dec_prot_u32(&curr_data[NAVX_REG_TIMESTAMP_L_L - first_address..])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:185:81
|
185 | self.ahrspos_update.base.op_status = curr_data[NAVX_REG_OP_STATUS - first_address];
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:185:79
|
185 | self.ahrspos_update.base.op_status = curr_data[NAVX_REG_OP_STATUS - first_address];
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:185:50
|
185 | self.ahrspos_update.base.op_status = curr_data[NAVX_REG_OP_STATUS - first_address];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:187:54
|
187 | curr_data[NAVX_REG_SELFTEST_STATUS - first_address];
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:187:52
|
187 | curr_data[NAVX_REG_SELFTEST_STATUS - first_address];
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:187:17
|
187 | curr_data[NAVX_REG_SELFTEST_STATUS - first_address];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:188:51
|
188 | self.ahrspos_update.base.cal_status = curr_data[NAVX_REG_CAL_STATUS];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:190:54
|
190 | curr_data[NAVX_REG_SENSOR_STATUS_L - first_address];
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:190:52
|
190 | curr_data[NAVX_REG_SENSOR_STATUS_L - first_address];
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:190:17
|
190 | curr_data[NAVX_REG_SENSOR_STATUS_L - first_address];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:192:45
|
192 | &curr_data[NAVX_REG_YAW_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:192:43
|
192 | &curr_data[NAVX_REG_YAW_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:192:18
|
192 | &curr_data[NAVX_REG_YAW_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:195:47
|
195 | &curr_data[NAVX_REG_PITCH_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:195:45
|
195 | &curr_data[NAVX_REG_PITCH_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:195:18
|
195 | &curr_data[NAVX_REG_PITCH_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:198:46
|
198 | &curr_data[NAVX_REG_ROLL_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:198:44
|
198 | &curr_data[NAVX_REG_ROLL_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:198:18
|
198 | &curr_data[NAVX_REG_ROLL_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:202:53
|
202 | &curr_data[NAVX_REG_HEADING_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:202:51
|
202 | &curr_data[NAVX_REG_HEADING_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:202:22
|
202 | &curr_data[NAVX_REG_HEADING_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:205:52
|
205 | &curr_data[NAVX_REG_MPU_TEMP_C_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:205:50
|
205 | &curr_data[NAVX_REG_MPU_TEMP_C_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:205:18
|
205 | &curr_data[NAVX_REG_MPU_TEMP_C_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:209:58
|
209 | &curr_data[NAVX_REG_LINEAR_ACC_X_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:209:56
|
209 | &curr_data[NAVX_REG_LINEAR_ACC_X_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:209:22
|
209 | &curr_data[NAVX_REG_LINEAR_ACC_X_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:213:58
|
213 | &curr_data[NAVX_REG_LINEAR_ACC_Y_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:213:56
|
213 | &curr_data[NAVX_REG_LINEAR_ACC_Y_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:213:22
|
213 | &curr_data[NAVX_REG_LINEAR_ACC_Y_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:217:58
|
217 | &curr_data[NAVX_REG_LINEAR_ACC_Z_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:217:56
|
217 | &curr_data[NAVX_REG_LINEAR_ACC_Z_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:217:22
|
217 | &curr_data[NAVX_REG_LINEAR_ACC_Z_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:220:52
|
220 | &curr_data[NAVX_REG_ALTITUDE_D_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:220:50
|
220 | &curr_data[NAVX_REG_ALTITUDE_D_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:220:18
|
220 | &curr_data[NAVX_REG_ALTITUDE_D_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:223:51
|
223 | &curr_data[NAVX_REG_PRESSURE_DL - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:223:49
|
223 | &curr_data[NAVX_REG_PRESSURE_DL - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:223:18
|
223 | &curr_data[NAVX_REG_PRESSURE_DL - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:227:59
|
227 | &curr_data[NAVX_REG_FUSED_HEADING_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:227:57
|
227 | &curr_data[NAVX_REG_FUSED_HEADING_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:227:22
|
227 | &curr_data[NAVX_REG_FUSED_HEADING_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:230:72
|
230 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_W_L - first_address..]) as f32
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:230:70
|
230 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_W_L - first_address..]) as f32
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:230:42
|
230 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_W_L - first_address..]) as f32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:233:72
|
233 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_X_L - first_address..]) as f32
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:233:70
|
233 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_X_L - first_address..]) as f32
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:233:42
|
233 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_X_L - first_address..]) as f32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:236:72
|
236 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_Y_L - first_address..]) as f32
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:236:70
|
236 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_Y_L - first_address..]) as f32
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:236:42
|
236 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_Y_L - first_address..]) as f32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:239:72
|
239 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_Z_L - first_address..]) as f32
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:239:70
|
239 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_Z_L - first_address..]) as f32
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:239:42
|
239 | registers::dec_prot_i16(&curr_data[NAVX_REG_QUAT_Z_L - first_address..]) as f32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:243:53
|
243 | &curr_data[NAVX_REG_VEL_X_I_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:243:51
|
243 | &curr_data[NAVX_REG_VEL_X_I_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:243:22
|
243 | &curr_data[NAVX_REG_VEL_X_I_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:246:53
|
246 | &curr_data[NAVX_REG_VEL_Y_I_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:246:51
|
246 | &curr_data[NAVX_REG_VEL_Y_I_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:246:22
|
246 | &curr_data[NAVX_REG_VEL_Y_I_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:249:53
|
249 | &curr_data[NAVX_REG_VEL_Z_I_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:249:51
|
249 | &curr_data[NAVX_REG_VEL_Z_I_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:249:22
|
249 | &curr_data[NAVX_REG_VEL_Z_I_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:252:54
|
252 | &curr_data[NAVX_REG_DISP_X_I_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:252:52
|
252 | &curr_data[NAVX_REG_DISP_X_I_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:252:22
|
252 | &curr_data[NAVX_REG_DISP_X_I_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:255:54
|
255 | &curr_data[NAVX_REG_DISP_Y_I_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:255:52
|
255 | &curr_data[NAVX_REG_DISP_Y_I_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:255:22
|
255 | &curr_data[NAVX_REG_DISP_Y_I_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:258:54
|
258 | &curr_data[NAVX_REG_DISP_Z_I_L - first_address..],
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:258:52
|
258 | &curr_data[NAVX_REG_DISP_Z_I_L - first_address..],
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:258:22
|
258 | &curr_data[NAVX_REG_DISP_Z_I_L - first_address..],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:284:75
|
284 | self.board_state.cal_status = curr_data[NAVX_REG_CAL_STATUS - first_address];
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:284:73
|
284 | self.board_state.cal_status = curr_data[NAVX_REG_CAL_STATUS - first_address];
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:284:43
|
284 | self.board_state.cal_status = curr_data[NAVX_REG_CAL_STATUS - first_address];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:285:73
|
285 | self.board_state.op_status = curr_data[NAVX_REG_OP_STATUS - first_address];
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:285:71
|
285 | self.board_state.op_status = curr_data[NAVX_REG_OP_STATUS - first_address];
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:285:42
|
285 | self.board_state.op_status = curr_data[NAVX_REG_OP_STATUS - first_address];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:286:85
|
286 | self.board_state.selftest_status = curr_data[NAVX_REG_SELFTEST_STATUS - first_address];
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:286:83
|
286 | self.board_state.selftest_status = curr_data[NAVX_REG_SELFTEST_STATUS - first_address];
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:286:48
|
286 | self.board_state.selftest_status = curr_data[NAVX_REG_SELFTEST_STATUS - first_address];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:288:79
|
288 | registers::dec_prot_u16(&curr_data[NAVX_REG_SENSOR_STATUS_L - first_address..])
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:288:77
|
288 | registers::dec_prot_u16(&curr_data[NAVX_REG_SENSOR_STATUS_L - first_address..])
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:288:42
|
288 | registers::dec_prot_u16(&curr_data[NAVX_REG_SENSOR_STATUS_L - first_address..])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:290:83
|
290 | self.board_state.update_rate_hz = curr_data[NAVX_REG_UPDATE_RATE_HZ - first_address];
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:290:81
|
290 | self.board_state.update_rate_hz = curr_data[NAVX_REG_UPDATE_RATE_HZ - first_address];
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:290:47
|
290 | self.board_state.update_rate_hz = curr_data[NAVX_REG_UPDATE_RATE_HZ - first_address];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:292:78
|
292 | registers::dec_prot_u16(&curr_data[NAVX_REG_GYRO_FSR_DPS_L - first_address..])
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:292:76
|
292 | registers::dec_prot_u16(&curr_data[NAVX_REG_GYRO_FSR_DPS_L - first_address..])
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:292:42
|
292 | registers::dec_prot_u16(&curr_data[NAVX_REG_GYRO_FSR_DPS_L - first_address..])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:294:77
|
294 | self.board_state.accel_fsr_g = curr_data[NAVX_REG_ACCEL_FSR_G - first_address] as i16;
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:294:75
|
294 | self.board_state.accel_fsr_g = curr_data[NAVX_REG_ACCEL_FSR_G - first_address] as i16;
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:294:44
|
294 | self.board_state.accel_fsr_g = curr_data[NAVX_REG_ACCEL_FSR_G - first_address] as i16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:296:82
|
296 | registers::dec_prot_u16(&curr_data[NAVX_REG_CAPABILITY_FLAGS_L - first_address..])
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:296:80
|
296 | registers::dec_prot_u16(&curr_data[NAVX_REG_CAPABILITY_FLAGS_L - first_address..])
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:296:42
|
296 | registers::dec_prot_u16(&curr_data[NAVX_REG_CAPABILITY_FLAGS_L - first_address..])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:301:72
|
301 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_X_L - first_address..]);
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:301:70
|
301 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_X_L - first_address..]);
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:301:42
|
301 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_X_L - first_address..]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:303:72
|
303 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_Y_L - first_address..]);
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:303:70
|
303 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_Y_L - first_address..]);
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:303:42
|
303 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_Y_L - first_address..]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:305:72
|
305 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_Z_L - first_address..]);
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:305:70
|
305 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_Z_L - first_address..]);
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:305:42
|
305 | registers::dec_prot_i16(&curr_data[NAVX_REG_GYRO_Z_L - first_address..]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:307:71
|
307 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_X_L - first_address..]);
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:307:69
|
307 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_X_L - first_address..]);
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:307:42
|
307 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_X_L - first_address..]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:309:71
|
309 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_Y_L - first_address..]);
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:309:69
|
309 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_Y_L - first_address..]);
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:309:42
|
309 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_Y_L - first_address..]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:311:71
|
311 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_Z_L - first_address..]);
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:311:69
|
311 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_Z_L - first_address..]);
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:311:42
|
311 | registers::dec_prot_i16(&curr_data[NAVX_REG_ACC_Z_L - first_address..]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error[E0308]: mismatched types
--> src/lib.rs:313:71
|
313 | registers::dec_prot_i16(&curr_data[NAVX_REG_MAG_X_L - first_address..]);
| ^^^^^^^^^^^^^ expected u8, found usize
error[E0277]: cannot subtract `usize` from `u8`
--> src/lib.rs:313:69
|
313 | registers::dec_prot_i16(&curr_data[NAVX_REG_MAG_X_L - first_address..]);
| ^ no implementation for `u8 - usize`
|
= help: the trait `std::ops::Sub<usize>` is not implemented for `u8`
error[E0277]: the trait bound `std::ops::RangeFrom<u8>: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:313:42
|
313 | registers::dec_prot_i16(&curr_data[NAVX_REG_MAG_X_L - first_address..]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeFrom<u8>`
= note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeFrom<u8>>` for `[u8]`
error: aborting due to 133 previous errors
Some errors occurred: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: Could not compile `navx`.
To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment