Skip to content

Commit

Permalink
Shayan/GPS&RTOSQueue (#1144)
Browse files Browse the repository at this point in the history
…TOS queue implementation

### Summary
Same as prev PR just rebased on DCM refactor

### Changelist 
<!-- Give a list of the changes covered in this PR. This will help both
you and the reviewer keep this PR within scope. -->

### Testing Done
CAN Testing was done on the queue to see if it was receiving and
transmitting data. GPS still needs to be tested

### Resolved Issues
<!-- Link any issues that this PR resolved like so: `Resolves #1, #2,
and #5` (Note: Using this format, Github will automatically close the
issue(s) when this PR is merged in). -->

### Checklist
*Please change `[ ]` to `[x]` when you are ready.*
- [ ] I have read and followed the code conventions detailed in
[README.md](../README.md) (*This will save time for both you and the
reviewer!*).
- [ ] If this pull request is longer then **500** lines, I have provided
*explicit* justification in the summary above explaining why I *cannot*
break this up into multiple pull requests (*Small PR's are faster and
less painful for everyone involved!*).
  • Loading branch information
shayana18 authored Feb 23, 2024
1 parent b1bbfc5 commit 77fa4b0
Show file tree
Hide file tree
Showing 10 changed files with 326 additions and 248 deletions.
3 changes: 2 additions & 1 deletion can_bus/thruna/DCM/DCM_alerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"WatchdogTimeout",
"TxOverflow",
"RxOverflow",
"RegenNotAvailable"
"RegenNotAvailable",
"SbgRxOverflow"
],
"faults": [
"MissingBMSHeartbeat",
Expand Down
9 changes: 8 additions & 1 deletion can_bus/thruna/DCM/DCM_enum.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@
"DcmState": {
"DCM_INIT_STATE": 0,
"DCM_DRIVE_STATE": 1
},

"DcmSbgStatus": {
"Solution_Computed": 0,
"Insufficent_Readings": 1,
"Internal_Error": 2,
"Limit_Exceeded": 3
}
}
}
94 changes: 93 additions & 1 deletion can_bus/thruna/DCM/DCM_tx.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,5 +420,97 @@
"resolution": 0.1
}
}
},
"GpsPosInfo":{
"msg_id": 217,
"cycle_time": 100,
"description": "Car position info",
"signals":{
"PositionStatus":{
"enum": "DcmSbgStatus"
},
"Latitude":{
"resolution": 0.00005,
"min": 47,
"max": 50,
"unit": "deg"
},
"LatitudeAccuracy":{
"resolution": 0.1,
"min": 0,
"max": 2,
"unit": "m"
},
"Longtitude":{
"resolution": 0.00005,
"min": 122,
"max": 125,
"unit": "deg"
},
"LongtitudeAccuracy":{
"resolution": 0.1,
"min": 0,
"max": 2,
"unit": "m"
},
"Altitude":{
"resolution": 0.5,
"min": 0,
"max": 400,
"unit": "m"
},
"AltitudeAccuracy":{
"resolution": 0.1,
"min": 0,
"max": 20,
"unit": "m"
}
}
},
"GpsVelInfo":{
"msg_id": 218,
"cycle_time": 100,
"description": "Car Velocity info",
"signals":{
"VelocityStatus":{
"enum":"DcmSbgStatus"
},
"VelocityNorth":{
"resolution": 0.1,
"min": 0,
"max": 120,
"unit": "m/s"
},
"VelocityNorthAccuracy":{
"resolution": 0.1,
"min": 0,
"max": 20,
"unit": "m/s"
},
"VelocityEast":{
"resolution": 0.1,
"min": 0,
"max": 120,
"unit": "m/s"
},
"VelocityEastAccuracy":{
"resolution": 0.1,
"min": 0,
"max": 20,
"unit": "m/s"
},
"VelocityDown":{
"resolution": 0.1,
"min": 0,
"max": 120,
"unit": "m/s"
},
"VelocityDownAccuracy":{
"resolution": 0.1,
"min": 0,
"max": 20,
"unit": "m/s"
}
}
}
}
}
72 changes: 0 additions & 72 deletions firmware/shared/src/app/App_RingQueue.c

This file was deleted.

46 changes: 0 additions & 46 deletions firmware/shared/src/app/App_RingQueue.h

This file was deleted.

86 changes: 0 additions & 86 deletions firmware/shared/test/Test_RingQueue.cpp

This file was deleted.

1 change: 0 additions & 1 deletion firmware/thruna/DCM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ file(GLOB_RECURSE APP_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/app/*.c")
list(APPEND APP_SRCS
"${SHARED_APP_INCLUDE_DIR}/app_stateMachine.c"
"${SHARED_APP_INCLUDE_DIR}/app_heartbeatMonitor.c"
"${SHARED_APP_INCLUDE_DIR}/App_RingQueue.c"
"${SHARED_APP_INCLUDE_DIR}/app_timer.c"
"${SHARED_APP_INCLUDE_DIR}/app_rangeCheck.c"
)
Expand Down
Loading

0 comments on commit 77fa4b0

Please sign in to comment.