CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
camera_telecommand_defs.c File Reference
#include "telecommand_exec/telecommand_args_helpers.h"
#include "telecommands/camera_telecommand_defs.h"
#include "config/configuration.h"
#include "camera/camera_init.h"
#include "camera/camera_capture.h"
#include "log/log.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for camera_telecommand_defs.c:

Functions

uint8_t TCMDEXEC_camera_setup (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Set up the camera by powering on and changing the baudrate to 230400.
 
uint8_t TCMDEXEC_camera_test (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Send the 't' test command to the camera, and check if the response is valid.
 
uint8_t TCMDEXEC_camera_change_baud_rate (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Debugging only. Set the baud rate of the camera to the specified value. Use camera_setup normally.
 
uint8_t TCMDEXEC_camera_capture (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Send telecommand to camera and capture an image. RUN CAM_SETUP BEFORE THIS EVERY TIME!
 

Function Documentation

◆ TCMDEXEC_camera_capture()

uint8_t TCMDEXEC_camera_capture ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Send telecommand to camera and capture an image. RUN CAM_SETUP BEFORE THIS EVERY TIME!

Parameters
args_str
  • Arg 0: filename to save the image to (max 32 chars)
  • Arg 1: lighting mode (single character: d,m,n,s)
response_output_bufBuffer to write the response to
response_output_buf_lenMax length of the buffer
Returns
0 if successful, >0 if an error occurred
Here is the call graph for this function:

◆ TCMDEXEC_camera_change_baud_rate()

uint8_t TCMDEXEC_camera_change_baud_rate ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Debugging only. Set the baud rate of the camera to the specified value. Use camera_setup normally.

Parameters
args_str
  • Arg 1: Baudrate to change to (bits per second). 10 options from 1200 to 921600.
Returns
0 if successful, >0 if an error occurred
Here is the call graph for this function:

◆ TCMDEXEC_camera_setup()

uint8_t TCMDEXEC_camera_setup ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Set up the camera by powering on and changing the baudrate to 230400.

Parameters
args_str
response_output_bufBuffer to write the response to
response_output_buf_lenMax length of the buffer
Returns
0 if successful, >0 if an error occurred
Here is the call graph for this function:

◆ TCMDEXEC_camera_test()

uint8_t TCMDEXEC_camera_test ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Send the 't' test command to the camera, and check if the response is valid.

Parameters
args_str
response_output_bufBuffer to write the response to
response_output_buf_lenMax length of the buffer
Returns
0 if successful, >0 if an error occurred
Here is the call graph for this function: