v1.9.9-pre-30: revert always send voltages
All checks were successful
Build and release .deb / Release (push) Successful in 54s
All checks were successful
Build and release .deb / Release (push) Successful in 54s
This commit is contained in:
parent
cec26d8cfb
commit
ab3cd28f83
4 changed files with 18 additions and 18 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -239,7 +239,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
|||
|
||||
[[package]]
|
||||
name = "charge-controller-supervisor"
|
||||
version = "1.9.9-pre-29"
|
||||
version = "1.9.9-pre-30"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"chrono",
|
||||
|
@ -2205,7 +2205,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tesla-charge-controller"
|
||||
version = "1.9.9-pre-29"
|
||||
version = "1.9.9-pre-30"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
|
|
|
@ -4,7 +4,7 @@ default-members = ["charge-controller-supervisor"]
|
|||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "1.9.9-pre-29"
|
||||
version = "1.9.9-pre-30"
|
||||
|
||||
[workspace.lints.clippy]
|
||||
pedantic = "warn"
|
||||
|
|
|
@ -101,10 +101,10 @@ impl Controller {
|
|||
let data = self.inner.refresh().await?;
|
||||
|
||||
if let Some(tx) = self.voltage_tx.as_mut() {
|
||||
// if crate::config::access_config()
|
||||
// .await
|
||||
// .enable_secondary_control
|
||||
// {
|
||||
if crate::config::access_config()
|
||||
.await
|
||||
.enable_secondary_control
|
||||
{
|
||||
let target = data.common().target_voltage;
|
||||
log::debug!(
|
||||
"tristar {}: primary: sending target voltage {}",
|
||||
|
@ -113,7 +113,7 @@ impl Controller {
|
|||
);
|
||||
|
||||
tx.send(VoltageCommand::Set(target))?;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
*self.data.write_state().await = Some(data);
|
||||
|
|
|
@ -840,9 +840,9 @@ impl Tristar {
|
|||
|
||||
pub async fn set_target_voltage(&mut self, target_voltage: f64) -> eyre::Result<()> {
|
||||
let scaled_voltage: u16 = self.scale_voltage(target_voltage);
|
||||
// self.modbus
|
||||
// .write_single_register(TristarRamAddress::VbRefSlave as u16, scaled_voltage)
|
||||
// .await??;
|
||||
self.modbus
|
||||
.write_single_register(TristarRamAddress::VbRefSlave as u16, scaled_voltage)
|
||||
.await??;
|
||||
|
||||
log::debug!(
|
||||
"tristar {} being set to voltage {target_voltage} (scaled: {scaled_voltage:#X?})",
|
||||
|
|
Loading…
Add table
Reference in a new issue