Skip to content

Commit

Permalink
update sendcarcan docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IshDeshpa committed Jan 20, 2024
1 parent 1778607 commit 1e96bb1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
10 changes: 6 additions & 4 deletions Apps/Inc/SendCarCAN.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/**
* @file SendCarCAN.h
* @brief The Send Car CAN task is a simple queue consumer task. Multiple
* tasks that need to write the the car CAN bus; in order to do this safely,
* they append their messages to a CAN queue. The Send Car CAN task simply pends
* on this queue and forwards messages to the Car CAN bus when any arrive.
* @brief Sends any CarCAN messages put in the queue via SendCarCAN_Put, and handles
* transmitting the IO State of the car for telemetry & ignition sequence.
*
* Call SendCarCAN_Init() to initialize the queue and semaphore. Call SendCarCAN_Put() to
* put a message in the queue. Starting the SendCarCAN task will send any messages
* put in the queue, as well as spawn PutIOState task to forward the IO state.
*
*/
#ifndef __SENDCARCAN_H
Expand Down
14 changes: 10 additions & 4 deletions Apps/Src/SendCarCAN.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/**
* @file SendCarCAN.c
* @details
*
* The Send Car CAN task is a simple queue consumer task. Multiple
* tasks need to write to the car CAN bus; in order to do this safely,
* they append their messages to a CAN queue. The Send Car CAN task simply pends
* on this queue and forwards messages to the Car CAN bus when any arrive.
*
* The tasks that produce messages for the SendCarCAN queue include:
* - [ReadTritium](./ReadTritium.html) (all messages on MotorCAN bus are echoed across CarCAN bus)
* - [SendTritium](./ReadTritium.html) (the current FSM state is echoed across CarCAN bus for logging)
* - [SendTritium](./SendTritium.html) (the current FSM state is echoed across CarCAN bus for logging)
* - PutIOState (the current IO state is echoed across CarCAN bus for logging and for the ignition sequence)
*
* # Put IO State Task
* The Put IO State task puts the current IO state on the CAN bus. It is used to send the IO state
* to Data Acquisition (for logging purposes) and the BPS (for ignition sequence purposes). Currently, it is
* written within `SendCarCAN.c`. It is a separate task from SendCarCAN (subject to change).
* written within SendCarCAN.c. It is a separate task from SendCarCAN (subject to change).
*
*/

#include "common.h"
Expand All @@ -22,7 +29,6 @@
#include "SendTritium.h"

/**
* @def IO_STATE_DLY_MS
* @brief Period of the IO state message in milliseconds
*/
#define IO_STATE_DLY_MS 250u
Expand Down
13 changes: 12 additions & 1 deletion Docs/source/Apps/SendCarCAN.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
************
Send Car CAN
************

.. doxygenfile:: SendCarCAN.h
:sections: briefdescription

=============
Usage Details
=============
.. doxygenfile:: SendCarCAN.h
:sections: detaileddescription

==================
Functional Details
==================
.. doxygenfile:: SendCarCAN.c
:sections: detaileddescription

===
API
===
.. doxygenfile:: SendCarCAN.h
:sections: define enum func typedef

0 comments on commit 1e96bb1

Please sign in to comment.