130 FILE* data = (FILE*)-1;
140 FILE* ambient_file = (FILE*)-1;
151 rl_log(
WARNING,
"no calibration file, returning uncalibrated values");
165 fclose(ambient_file);
int force_high_channels[NUM_I_CHANNELS]
Current channels to force to high range.
int write_status(struct rl_status *status)
Limited sampling mode (limited by number of samples to take)
void Sensors_close(int sensors_available[])
rl_mode mode
Sampling mode.
int available_sensors[AMBIENT_MAX_SENSOR_COUNT]
struct rl_status status
Current status of RocketLogger.
void Sensors_closeSharedBus(void)
void rl_log(rl_log_type type, const char *format,...)
#define FHR2_GPIO
Linux GPIO number for forcing I2 high.
void pwm_setup_range_clock(int sample_rate)
struct rl_ambient ambient
Ambient conf.
#define LED_ERROR_GPIO
Linux GPIO number of error LED.
uint64_t samples_taken
Number of samples taken.
int gpio_set_value(int num, int val)
#define LED_STATUS_GPIO
Linux GPIO number of status LED.
int Sensors_scan(int sensors_available[])
char file_name[MAX_PATH_LENGTH]
Data file name.
int hw_sample(struct rl_conf *conf, char *file_comment)
#define CHANNEL_DISABLED
Channel sampling disabled.
rl_file_format file_format
File format.
uint32_t buffer_number
Number of buffers taken.
int gpio_unexport(int num)
char file_name[MAX_PATH_LENGTH]
struct rl_conf conf
Current configuration.
int sample_rate
Sampling rate.
#define FHR1_GPIO
Linux GPIO number for forcing I1 high.
void hw_init(struct rl_conf *conf)
int pru_sample(FILE *data_file, FILE *ambient_file, struct rl_conf *conf, char *file_comment)
rl_sampling sampling
Sampling state.
#define MIN_ADC_RATE
Minimal ADC sampling rate.
int Sensors_initSharedBus(void)
void pwm_setup_adc_clock(void)
void hw_close(struct rl_conf *conf)
int read_calibration(struct rl_conf *conf)
int gpio_dir(int num, rl_direction dir)