mirror of
https://github.com/italicsjenga/mppt-modbus.git
synced 2024-12-23 08:41:30 +11:00
do that stuff to info::from()
This commit is contained in:
parent
383fa7dd3e
commit
f66491885f
|
@ -1 +1 @@
|
|||
Subproject commit 8b80153b46023dd795a24b3e937845e0fc184240
|
||||
Subproject commit ebc2b3ab00cdc2e90a0a32303003a668a706167b
|
|
@ -177,10 +177,10 @@ fn get_data(modbus: &Modbus) -> (Info, MpptRam, MpptEeprom) {
|
|||
.expect("couldnt");
|
||||
let info = Info::from(&data_in);
|
||||
|
||||
let mut a = INFO_SCALE.lock().expect("Couldn't lock info");
|
||||
a.v_scale = info.v_scale;
|
||||
a.i_scale = info.i_scale;
|
||||
drop(a);
|
||||
if let Ok(mut g_info) = INFO_SCALE.lock() {
|
||||
g_info.v_scale = info.v_scale;
|
||||
g_info.i_scale = info.i_scale;
|
||||
};
|
||||
|
||||
let ram_data = MpptRam {
|
||||
v_pu_hi: Raw::from_u16(data_in[OffsetsRam::V_PU_HI]),
|
||||
|
|
Loading…
Reference in a new issue