Skip to content

[BUG] Beacon is Not Detecting Magnetometer Proto #310

@Mikefly123

Description

@Mikefly123

Summary

We're getting a fresh typecheck error when downstream implementation repos are updating to use 25w36+ releases. I think this is just a quick patch that is needed to the Beacon class.

  /home/runner/work/CircuitPython_RP2350_v5b/CircuitPython_RP2350_v5b/src/flight-software/main.py:124:9 - error: Argument of type "LIS2MDLManager" cannot be assigned to parameter "args" of type "PowerMonitorProto | RadioProto | IMUProto | TemperatureSensorProto | Flag | Counter | Processor" in function "__init__"
    Type "LIS2MDLManager" is not assignable to type "PowerMonitorProto | RadioProto | IMUProto | TemperatureSensorProto | Flag | Counter | Processor"
      "LIS2MDLManager" is not assignable to "PowerMonitorProto"
      "LIS2MDLManager" is not assignable to "RadioProto"
      "LIS2MDLManager" is not assignable to "IMUProto"
      "LIS2MDLManager" is not assignable to "TemperatureSensorProto"
      "LIS2MDLManager" is not assignable to "Flag"
      "LIS2MDLManager" is not assignable to "Counter"
      "LIS2MDLManager" is not assignable to "Processor" (reportArgumentType)

I think the patch for this will be to update Beacon with the Magnetometer Proto in the __init__ and also add a function that parses the magnetometer data in a similar way to the IMU data.

Steps to reproduce

  • Update a downstream implementation repo to use PySquared 25w36+
  • Run the typechecker

Environment

  • GitHub Actions CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions