Skip to content

SNS - Overhaul - #91

Merged
kshxtij merged 37 commits into
masterfrom
sns-overhaul
Feb 16, 2023
Merged

SNS - Overhaul#91
kshxtij merged 37 commits into
masterfrom
sns-overhaul

Conversation

@ishmis

@ishmis ishmis commented Feb 4, 2023

Copy link
Copy Markdown
Contributor
  • Update temp + accelerometer code
  • Update REPL
  • Update Mux code + change it to be I2c specfic as an analog mux is on its way
  • kWarn
  • Separate function to check for if "data ready" before calling read on sensors
  • Update ADC code to convert raw value to actual voltage value
  • Adding skeleton code for sensors to be implemented soon™
  • virtual tags for derived methods in I/O
  • enforcing 0 default initializations
  • fixed mistakes in I/O
  • static constexpr for values that never need to accessed outside of a class (register addresses or class constants)

@ishmis ishmis added the sensors Sensors Project label Feb 4, 2023
@ishmis
ishmis requested a review from kshxtij as a code owner February 4, 2023 20:32
@ishmis ishmis self-assigned this Feb 4, 2023
Comment thread lib/debug/repl.cpp
Comment thread lib/debug/repl.cpp
Comment thread lib/core/types.hpp Outdated
Comment thread lib/debug/repl.cpp
Comment thread lib/io/hardware_adc.cpp Outdated
Comment thread lib/sensors/accelerometer.cpp Outdated
Comment thread lib/sensors/accelerometer.cpp Outdated
Comment thread lib/sensors/i2c_mux.hpp
Comment thread lib/sensors/i2c_mux.hpp Outdated
Comment thread lib/sensors/i2c_mux.hpp Outdated
Comment thread lib/sensors/thermister.hpp Outdated
Comment thread lib/sensors/temperature.cpp
@ishmis

ishmis commented Feb 11, 2023

Copy link
Copy Markdown
Contributor Author

#47 covers virtual tags being added to temp + acc so wont do it here

@ishmis ishmis mentioned this pull request Feb 11, 2023
7 tasks
Comment thread lib/io/hardware_adc.cpp Outdated
Comment thread lib/io/hardware_gpio_alt.hpp Outdated
Comment thread lib/io/hardware_uart.hpp
@ishmis
ishmis requested a review from TomLonergan03 February 11, 2023 15:41
Comment thread lib/debug/repl.hpp
Comment thread lib/io/hardware_adc.cpp Outdated
Comment thread lib/io/hardware_adc.cpp Outdated
Comment thread lib/io/hardware_adc.cpp Outdated
Comment thread lib/io/hardware_adc.cpp
Comment thread lib/sensors/temperature.cpp
Comment thread lib/sensors/temperature.cpp
Comment thread lib/sensors/temperature.cpp
Comment thread lib/utils/dummy_adc.hpp
~DummyAdc() = default;

std::optional<std::uint16_t> readValue();
virtual std::optional<core::Float> readValue();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

include core types

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same justification as before, imported in its base class

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess leave it for now and discuss monday?

Comment thread lib/utils/dummy_uart.hpp
Comment thread lib/io/hardware_spi.cpp
Comment thread lib/sensors/accelerometer.cpp
Comment thread lib/sensors/accelerometer.cpp
Comment thread lib/sensors/accelerometer.hpp Outdated
Comment thread lib/sensors/i2c_converter.hpp
Comment thread lib/sensors/i2c_mux.hpp Outdated
Comment thread lib/sensors/i2c_mux.hpp
Comment thread lib/utils/dummy_adc.hpp
~DummyAdc() = default;

std::optional<std::uint16_t> readValue();
virtual std::optional<core::Float> readValue();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess leave it for now and discuss monday?

@ishmis
ishmis requested a review from maxguy2001 February 11, 2023 21:04
Comment thread lib/sensors/accelerometer.hpp
@ishmis
ishmis requested a review from Platiniom64 February 12, 2023 09:17

@maxguy2001 maxguy2001 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor new style guide changes to be implemented but otherwise all good.

@TomLonergan03 TomLonergan03 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, will check includes once I'm at my pc later tonight

Comment thread lib/io/hardware_uart.hpp

@TomLonergan03 TomLonergan03 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

i've not found any missing includes but looking at includes is making my eyes water so I might have missed something

@ishmis

ishmis commented Feb 14, 2023

Copy link
Copy Markdown
Contributor Author

in line with what we discussed yesterday, i've made register addresses + constants for adc a private static constexpr since it should never be used anywhere other than the class -> this means confusion between possible overlapping register names between sensors can be avoided entirely @TomLonergan03 @maxguy2001

@kshxtij
kshxtij merged commit 4c6c710 into master Feb 16, 2023
@kshxtij
kshxtij deleted the sns-overhaul branch February 16, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sensors Sensors Project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants