40 lines
943 B
C
40 lines
943 B
C
#pragma once
|
|
#include <stdint.h>
|
|
#ifdef AUTOFILM_HOST
|
|
#include "esp_host_compat.h"
|
|
#else
|
|
#include "esp_err.h"
|
|
#endif
|
|
|
|
#define PROCESS_COUNT 6
|
|
#define PROCESS_MAX_STEPS 20
|
|
|
|
enum {
|
|
PROC_C41 = 0,
|
|
PROC_E6 = 1,
|
|
PROC_ECN2 = 2,
|
|
PROC_BW = 3,
|
|
PROC_CUSTOM = 4,
|
|
PROC_BWREV = 5
|
|
};
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
uint16_t time_s;
|
|
float cw_revs, ccw_revs;
|
|
float temp_min_c, temp_pref_c, temp_max_c;
|
|
} process_step_t;
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
uint8_t step_count;
|
|
const process_step_t *steps;
|
|
} process_def_t;
|
|
|
|
void app_process_init(void); /* zero session deltas */
|
|
const process_def_t *app_process_get(uint8_t id);
|
|
const process_def_t *app_process_find_name(const char *name);
|
|
uint16_t app_process_time_s(uint8_t id, uint8_t step); /* default + session delta, min 0 */
|
|
esp_err_t app_process_adjust_time(uint8_t id, uint8_t step, int8_t delta_s);
|
|
void app_process_reset_session(uint8_t id);
|