Severson-Group / Severson-Group/docs.amdc.dev
Update the AMDC article `Tutorial: Timing & Sensors` to clarify the location of `extern unit8_t` declaration
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 1
- Forks
- 3
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 1
Description
Context
Related Issues / PRs:
- https://github.com/Severson-Group/docs.amdc.dev/pull/112
- https://github.com/Severson-Group/docs.amdc.dev/pull/114
- https://github.com/Severson-Group/docs.amdc.dev/pull/123
- https://github.com/Severson-Group/docs.amdc.dev/pull/136
While @hess0297 was doing the AMDC tutorial : Create a GitHub PR that implements tutorial 6 (Timing & Sensors), we encountered the build error (type not found error) in the SDK when declaring:
extern uint8_t sensor_flag;
only if we define this on the "top" of the task_controller.h file as instructed. After some investigation, it looks like we need to define extern uint8_t sensor_flag; after #include "sys/scheduler.h in the task_controller.h, i.e., the following code works:
#ifndef TASK_CONTROLLER_H
#define TASK_CONTROLLER_H
#include "sys/scheduler.h"
#include "drv/analog.h"
extern uint8_t sensor_flag;
but the following does not work:
extern uint8_t sensor_flag;
#ifndef TASK_CONTROLLER_H
#define TASK_CONTROLLER_H
#include "sys/scheduler.h"
#include "drv/analog.h"
Looks like the extern uint8_t sensor_flag; requires to include <stdint.h>, which is actually defined in
and therefore, extern uint8_t sensor_flag; needed to be located after the #include "sys/scheduler.h".
Approach
Update Tutorial: Timing & Sensors article to clearly specify the location that users should put, especially this section:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the linked Tutorial: Timing & Sensors article and find the “Reporting Sensor Acquisition Time and Sensor Data Staleness” section. Clarify where the extern uint8_t sensor_flag declaration belongs relative to the sys/scheduler.h include, then verify the rendered tutorial makes the required placement unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100