Skip to content

Conversation

@dbgen1
Copy link
Contributor

@dbgen1 dbgen1 commented Feb 7, 2025

Summary

This PR adds the proves-circuitpython-rv3028 repository as a library to the circuitpy-flight-software code. This PR will be ready once this pull request is approved and merged.

How was this tested

  • Added new unit tests
  • Ran code on hardware (screenshots are helpful)
  • Other (Please describe)

The code implemented by the rv3028 was tested with unit tests prior to submitting the PR. In addition, the library was brought on to this repository locally and tested on hardware, with no issues. The rv3028 library is successfully brought in with make and runs fine on the board.

@dbgen1 dbgen1 marked this pull request as ready for review February 7, 2025 01:49
Mikefly123
Mikefly123 previously approved these changes Feb 7, 2025
Copy link
Member

@Mikefly123 Mikefly123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great work putting this together Davit!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2025

Copy link
Member

@nateinaction nateinaction left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing some new errors in the flight control board. Thoughts on these?

{"hardware_key": "RTC", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:55", "level": "DEBUG"}
{"time": "2020-01-01 00:01:55", "level": "ERROR", "err": ["'I2C' object has no attribute 'write'"], "hardware_key": "RTC", "msg": "There was an error initializing this hardware component"}
{"hardware_key": "SD Card", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:55", "level": "DEBUG"}
{"time": "2020-01-01 00:01:57", "level": "ERROR", "err": ["no SD card"], "hardware_key": "SD Card", "msg": "There was an error initializing this hardware component"}
{"hardware_key": "NEOPIX", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:57", "level": "DEBUG"}
{"hardware_key": "TCA", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:57", "level": "DEBUG"}
{"time": "2020-01-01 00:01:57", "level": "ERROR", "err": ["Object has been deinitialized and can no longer be used. Create a new object."], "face": "Face0", "msg": "There was an Exception during the scan_tca_channels function call"}
{"time": "2020-01-01 00:01:57", "level": "ERROR", "err": ["Object has been deinitialized and can no longer be used. Create a new object."], "face": "Face1", "msg": "There was an Exception during the scan_tca_channels function call"}
{"time": "2020-01-01 00:01:57", "level": "ERROR", "err": ["Object has been deinitialized and can no longer be used. Create a new object."], "face": "Face2", "msg": "There was an Exception during the scan_tca_channels function call"}
{"time": "2020-01-01 00:01:57", "level": "ERROR", "err": ["Object has been deinitialized and can no longer be used. Create a new object."], "face": "Face3", "msg": "There was an Exception during the scan_tca_channels function call"}
{"time": "2020-01-01 00:01:57", "level": "ERROR", "err": ["Object has been deinitialized and can no longer be used. Create a new object."], "face": "Face4", "msg": "There was an Exception during the scan_tca_channels function call"}

For reference here's what main looks like:

{"hardware_key": "RTC", "msg": "Initializing hardware component", "time": "2020-01-01 00:05:07", "level": "DEBUG"}
{"hardware_key": "SD Card", "msg": "Initializing hardware component", "time": "2020-01-01 00:05:07", "level": "DEBUG"}
{"time": "2020-01-01 00:05:09", "level": "ERROR", "err": ["no SD card"], "hardware_key": "SD Card", "msg": "There was an error initializing this hardware component"}
{"hardware_key": "NEOPIX", "msg": "Initializing hardware component", "time": "2020-01-01 00:05:09", "level": "DEBUG"}
{"hardware_key": "TCA", "msg": "Initializing hardware component", "time": "2020-01-01 00:05:09", "level": "DEBUG"}
{"msg": "TCA try_lock failed. TCA may be malfunctioning.", "time": "2020-01-01 00:05:09", "level": "ERROR"}
{"msg": "PySquared Hardware Initialization Complete!", "time": "2020-01-01 00:05:09", "level": "DEBUG"}
{"time": "2020-01-01 00:05:09", "device": "I2C0", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "SPI0", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}
{"time": "2020-01-01 00:05:09", "device": "I2C1", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}
{"time": "2020-01-01 00:05:09", "device": "UART", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}
{"time": "2020-01-01 00:05:09", "device": "Radio1", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}
{"time": "2020-01-01 00:05:09", "device": "IMU", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}
{"time": "2020-01-01 00:05:09", "device": "Mag", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}
{"time": "2020-01-01 00:05:09", "device": "SDcard", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "NEOPIX", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}
{"time": "2020-01-01 00:05:09", "device": "WDT", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "TCA", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "Face0", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "Face1", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "Face2", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "Face3", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "Face4", "level": "WARNING", "msg": "Unable to initialize hardware device", "status": false}
{"time": "2020-01-01 00:05:09", "device": "RTC", "level": "INFO", "msg": "Successfully initialized hardware device", "status": true}

@Mikefly123
Copy link
Member

Mikefly123 commented Feb 7, 2025

Good catch @nateinaction I didn't actually have a board to run the code on as a test until a few minutes ago. I ran some tests myself and have a PR for fixing this issue as #7 on the RV repo.

We should probably block this merge for now until it is addressed.

@dbgen1
Copy link
Contributor Author

dbgen1 commented Feb 7, 2025

The new release of the rv3028 library fixes this issue! This is what it looks like now:

{"msg": "Code Starting in 5 seconds", "time": "2020-01-01 00:01:05", "level": "INFO"}
{"msg": "Code Starting in 4 seconds", "time": "2020-01-01 00:01:06", "level": "INFO"}
{"msg": "Code Starting in 3 seconds", "time": "2020-01-01 00:01:07", "level": "INFO"}
{"msg": "Code Starting in 2 seconds", "time": "2020-01-01 00:01:08", "level": "INFO"}
{"msg": "Code Starting in 1 seconds", "time": "2020-01-01 00:01:09", "level": "INFO"}
{"msg": "Initializing Config", "time": "2020-01-01 00:01:10", "level": "DEBUG"}
{"msg": "Booting up!", "boot_time": "1577836800s", "time": "2020-01-01 00:01:10", "level": "DEBUG"}
{"hardware_key": "I2C0", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:10", "level": "DEBUG"}
{"time": "2020-01-01 00:01:10", "level": "DEBUG", "cubesat": "Orpheus", "hardware_key": "I2C0", "msg": "Hardware component not initialized"}
{"hardware_key": "SPI0", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:10", "level": "DEBUG"}
{"hardware_key": "I2C1", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:10", "level": "DEBUG"}
{"hardware_key": "UART", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:10", "level": "DEBUG"}
{"hardware_key": "Radio1", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:11", "level": "DEBUG"}
{"hardware_key": "IMU", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:11", "level": "DEBUG"}
{"hardware_key": "Mag", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:11", "level": "DEBUG"}
{"hardware_key": "RTC", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:11", "level": "DEBUG"}
{"hardware_key": "RTC", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:11", "level": "DEBUG"}
{"hardware_key": "SD Card", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:11", "level": "DEBUG"}
{"time": "2020-01-01 00:01:13", "level": "ERROR", "err": ["no SD card"], "hardware_key": "SD Card", "msg": "There was an error initializing this hardware component"}
{"hardware_key": "TCA", "msg": "Initializing hardware component", "time": "2020-01-01 00:01:13", "level": "DEBUG"}
{"msg": "TCA try_lock failed. TCA may be malfunctioning.", "time": "2020-01-01 00:01:13", "level": "ERROR"}
{"msg": "PySquared Hardware Initialization Complete!", "time": "2020-01-01 00:01:13", "level": "DEBUG"}```

@dbgen1 dbgen1 merged commit b22f978 into main Feb 7, 2025
4 checks passed
@dbgen1 dbgen1 deleted the add-rv3028-lib branch February 7, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants