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