/*
 * config.h
 *
 *  Created on: Apr 23, 2021
 *      Author: Thom Maughan, tm@mbari.org
 */

#ifndef MPHOX_CONFIG_H_
#define MPHOX_CONFIG_H_

// data_cfg[TIMESTAMP] config types new 9 Apr 2022
#define TYPE_TIMESTAMP_OFF  0
#define TYPE_US_DATETIME    1
#define TYPE_EPOCH_MSEC     2

void configuration_menu(void);
void print_config_data_fields(void);
void config_data_fields(void);
void print_write_config_data_fields(uint32_t printFlg, uint32_t writeFlg, uint32_t padFlg);
void pump_sequencer_setup(void);

int print_write_metadata_header(const time_t currentTime, uint32_t printFlg, uint32_t writeFlg);
int write_metadata_header(const time_t currentTime);
void print_metadata_header(const time_t currentTime);

void print_sys_samp_data_structure(void);  // for debug
void print_sys_data_structure(void);  // for qa and debug

int print_write_data_header(uint32_t printFlg, uint32_t writeFlg);
void print_data_header(void);
int  write_data_header(void);

void get_header(void);
int enter_deployment_note(uint32_t timeout);
void enter_metadata(void);
void enter_pH_sensor_cal_coeff(void);
void change_baud_rate(void);

void print_all_metadata(void);  // print out all metadata
void config_sys_data_default_init(void);

void config_qa_data_init(void);

void edit_appcfg_fields(void);
void exercise_iso(void);

void copy_edit_sys_data_structure(void);

void config_adc24_sampling_parms(void);

void user_select_ctd(void);
void user_select_timestamp(void);

void ads1248_sampling_defaults(void);

uint32_t edit_uint(uint32_t *uint_data, uint32_t negLim, uint32_t posLim);
float edit_float(float *float_data, float negLim, float posLim);
uint32_t edit_string(char *char_data, uint32_t max_chars);

#endif /* CONFIG_H_ */
