-
Notifications
You must be signed in to change notification settings - Fork 2
Feature: Pressure + Strain Service #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ad58771
fix: messages protobuf path prefix and vscode protobuf resolution
darrenrahnemoon 8d6d22b
fix: vscode complaining about messages package
darrenrahnemoon b95c642
feature: pressure proto messages
darrenrahnemoon c3c4258
feature: pressure service without NTC implementation
darrenrahnemoon e7452aa
feature:
darrenrahnemoon 75f8d97
chore: remove old drivers and libs
darrenrahnemoon 301af81
fix: remove caching for now for builds to pass
darrenrahnemoon 137c82d
fix: remove cargo dependencies on dead libraries
darrenrahnemoon 12e21f6
fix: build issues with the new pressure and strain services
darrenrahnemoon 629b5ce
fix: cargo.toml cleanup for messages
darrenrahnemoon 2c75069
fix: disable cargo clippy all features since they're never on at the …
darrenrahnemoon f231273
fix: copilot comments
darrenrahnemoon f395e0b
feature: pressure dashboard
darrenrahnemoon b9f29b4
fix: commit grafana volume
darrenrahnemoon 6abc4b6
Revert "fix: commit grafana volume"
darrenrahnemoon 2ad7ab3
fix: database evolve first
darrenrahnemoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,47 @@ | ||
| # Temperature | ||
| from models.thermocouple_reading import ThermocoupleReading | ||
| from argus.temperature.thermocouple_reading_pb2 import ( | ||
| from messages.argus.temperature.thermocouple_reading_pb2 import ( | ||
| ThermocoupleReading as ThermocoupleReadingProto, | ||
| ) | ||
|
|
||
| message_type_to_model = { | ||
| ThermocoupleReadingProto: ThermocoupleReading, | ||
| # Pressure | ||
| from models.pressure_reading import PressureReading | ||
| from messages.argus.pressure.pressure_reading_pb2 import ( | ||
| PressureReading as PressureReadingProto, | ||
| ) | ||
|
|
||
| # Strain | ||
| from models.strain_reading import StrainReading | ||
| from messages.argus.strain.strain_reading_pb2 import ( | ||
| StrainReading as StrainReadingProto, | ||
| ) | ||
|
|
||
| proto_to_model = { | ||
| ThermocoupleReadingProto: lambda proto: ThermocoupleReading( | ||
| local_session=proto.local_session, | ||
| adc_device=proto.adc_device, | ||
| thermocouple_channel=proto.thermocouple_channel, | ||
| recorded_at=int(proto.recorded_at), | ||
| voltage=proto.voltage, | ||
| compensated_temperature=proto.compensated_temperature, | ||
| uncompensated_temperature=proto.uncompensated_temperature, | ||
| cold_junction_temperature=proto.cold_junction_temperature, | ||
| ), | ||
| PressureReadingProto: lambda proto: PressureReading( | ||
| local_session=proto.local_session, | ||
| adc_device=proto.adc_device, | ||
| pressure_channel=proto.pressure_channel, | ||
| recorded_at=int(proto.recorded_at), | ||
| voltage=proto.voltage, | ||
| pressure=proto.pressure, | ||
| temperature=proto.temperature, | ||
| ), | ||
| StrainReadingProto: lambda proto: StrainReading( | ||
| local_session=proto.local_session, | ||
| adc_device=proto.adc_device, | ||
| strain_channel=proto.strain_channel, | ||
| recorded_at=int(proto.recorded_at), | ||
| voltage=proto.voltage, | ||
| strain=proto.strain, | ||
| ), | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| from datetime import datetime | ||
| from peewee import ( | ||
| Model, | ||
| CharField, | ||
| TimestampField, | ||
| DoubleField, | ||
| ForeignKeyField, | ||
| IntegerField, | ||
| ) | ||
| from models.recording_session import HostRecordingSession | ||
| from utils.database import database | ||
|
|
||
|
|
||
| class PressureReading(Model): | ||
| # The recording session this reading belongs to | ||
| host_session = ForeignKeyField(HostRecordingSession, null=True) | ||
|
|
||
| # Local recording session identifier from the device that took the reading | ||
| local_session = IntegerField(null=True) | ||
|
|
||
| # ADC device index from which the reading was taken | ||
| adc_device = CharField(max_length=255, null=True) | ||
|
|
||
| # Pressure channel from which the reading was taken | ||
| pressure_channel = CharField(max_length=255, null=True) | ||
|
|
||
| # Milliseconds since the board's epoch when the reading was recorded | ||
| recorded_at = TimestampField(null=True) | ||
|
|
||
| # Full timestamp of when the reading was stored | ||
| stored_at = TimestampField(default=datetime.now) | ||
|
|
||
| # Wheatstone bridge voltage difference measured in millivolts | ||
| voltage = DoubleField(null=True) | ||
|
|
||
| # Pressure reading in psi | ||
| pressure = DoubleField(null=True) | ||
|
|
||
| # Temperature of the manifold from the NTC resistor at the time of the recording in degrees Celsius | ||
| temperature = DoubleField(null=True) | ||
|
|
||
| class Meta: | ||
| database = database | ||
| table_name = "pressure_readings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| from datetime import datetime | ||
| from peewee import ( | ||
| Model, | ||
| CharField, | ||
| TimestampField, | ||
| DoubleField, | ||
| ForeignKeyField, | ||
| IntegerField, | ||
| ) | ||
| from models.recording_session import HostRecordingSession | ||
| from utils.database import database | ||
|
|
||
|
|
||
| class StrainReading(Model): | ||
| # The recording session this reading belongs to | ||
| host_session = ForeignKeyField(HostRecordingSession, null=True) | ||
|
|
||
| # Local recording session identifier from the device that took the reading | ||
| local_session = IntegerField(null=True) | ||
|
|
||
| # ADC device index from which the reading was taken | ||
| adc_device = CharField(max_length=255, null=True) | ||
|
|
||
| # Pressure channel from which the reading was taken | ||
| strain_channel = CharField(max_length=255, null=True) | ||
|
|
||
| # Milliseconds since the board's epoch when the reading was recorded | ||
| recorded_at = TimestampField(null=True) | ||
|
|
||
| # Full timestamp of when the reading was stored | ||
| stored_at = TimestampField(default=datetime.now) | ||
|
|
||
| # Wheatstone bridge voltage difference measured in millivolts | ||
| voltage = DoubleField(null=True) | ||
|
|
||
| # Strain reading in microstrain | ||
| strain = DoubleField(null=True) | ||
|
|
||
| class Meta: | ||
| database = database | ||
| table_name = "strain_readings" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.