iqos_cli icon indicating copy to clipboard operation
iqos_cli copied to clipboard

chore: update to iqos crate v1.1.0

Open nonnil opened this issue 7 months ago • 0 comments

Background

iqos crate released v1.1.0 on 2026-04-21. Three PRs were merged:

  • PR #1 — feat: add Auto Start read support — adds read_autostart(model)
  • PR #2 — feat: add device status read — adds read_device_status(model, device_info) + DeviceStatus type; updates capability matrix (SmartGesture / AutoStart now route through supports_holder_features())
  • PR #4 — Add charge start vibration capability — adds DeviceCapability::ChargeStartVibration; breaking: set_flexpuff and read_flexpuff now require an explicit model: DeviceModel parameter

Tasks

Mandatory (breaking change — won't compile on 1.1.0)

  • [ ] Bump iqos dependency to 1.1.0 in Cargo.toml
  • [ ] Fix flexpuff.rs: update set_flexpuff and read_flexpuff calls to pass model
    • iqos.set_flexpuff(FlexPuffSetting::new(true)) → iqos.set_flexpuff(model, FlexPuffSetting::new(true))
    • iqos.read_flexpuff() → iqos.read_flexpuff(model)

New features

  • [ ] autostart status subcommand: use read_autostart(model) -> Result<bool> to print current state
  • [ ] Device status command: expose read_device_status(model, device_info) -> Result<DeviceStatus> — aggregates stick firmware version, optional holder firmware version, optional battery voltage. Consider device-status subcommand or folding into info.

Capability matrix review

  • [ ] Review compat.rs against updated crate matrix: PR #2 changed SmartGesture and AutoStart to route through supports_holder_features() = {Iluma, IlumaPrime, IlumaI, IlumaIPrime}. Our supports_smartgesture() currently uses is_iluma_i_family() = {IlumaIOne, IlumaI, IlumaIPrime}. Determine whether the crate matrix is now correct and whether compat.rs overrides are still necessary.
  • [ ] ChargeStartVibration in compat.rs: supports_charge_start_vibration() is now in the crate (routes through supports_holder_features()). Evaluate whether compat.rs needs a corresponding gate, or whether the crate's read_vibration_settings / update_vibration_settings already handle it internally.

Acceptance Criteria

  • cargo check passes with iqos = "1.1.0"
  • cargo clippy -- -D warnings clean
  • autostart status prints current state or Error::Unsupported message for unsupported models
  • compat.rs is consistent with the 1.1.0 capability matrix, with inline justification for any deliberate divergence

nonnil avatar Apr 21 '26 11:04 nonnil