Audit-clean C standard across all 5 cb challenges: fix 3 functions over 8 exec lines; rebuild bins; update CB-0x03 and CB-0x05 guides; verify all guides against new bins

This commit is contained in:
Kevin Thomas committed 2026-10-11 17:43:45 -04:00
1 parent 4ade66738f
commit 23b9f628ef
51 files changed
+3744 -7904

No files matched your search

+18
View File
@@ -10,7 +10,25 @@
#ifndef PWM_CTRL_H
#define PWM_CTRL_H
/**
* @brief Initialize the servo PWM output.
*
* @param void No parameters.
* @return void
*/
void init_servo(void);
/**
* @brief Deploy the payload via servo actuation.
*
* @param void No parameters.
* @return void
*/
void deploy_payload(void);
/**
* @brief Lock the payload at the given altitude.
*
* @param altitude Altitude at which to lock the payload.
* @return void
*/
void lock_payload(int altitude);
#endif
+6
View File
@@ -17,5 +17,11 @@ typedef struct {
int current_altitude;
} drone_state_t;
extern drone_state_t drone;
/**
* @brief Process the payload state machine for one cycle.
*
* @param void No parameters.
* @return void
*/
void process_payload_state(void);
#endif
+2 -2
View File
@@ -16,10 +16,10 @@
int main(void) {
stdio_init_all();
init_servo();
// Allow servo to settle before announcing boot.
sleep_ms(2000);
printf("SYSTEM BOOT: HEAVY LIFT UAS ONLINE.\r\n");
// Run the payload state machine forever.
while (true) {
process_payload_state();
sleep_ms(2000);