newtx/hardware/cis/cis_param.h

44 lines
1.2 KiB
C++

// parameters of CIS
//
// Date: 2024-01-19
#pragma once
#include <vector>
#define CIS_SECTOR_COUNT 6 // how many sectors of ONE CIS
#define CIS_CORRECT_DATA_PATH "/usr/local/huago2/"
class gb_json;
namespace cis
{
std::vector<int> get_fixed_resolution(void);
// Function: how many pixels one sector generated
//
// Parameter: sec_num - sector index, from Zero to CIS_SECTOR_COUNT - 1
//
// dpi - this sector or CIS resolution
//
// side - true: front, false: back
int get_sector_pixels(int sec_num, int dpi, bool side);
// Function: get pixels for ONE scan line
//
// Parameter: dpi - this sector or CIS resolution
//
// color - true: color, false: gray
int get_line_stream_length(int dpi, bool color);
// Function: update correct data
//
// Parameter: init_dpi - default DPI
//
// init_clr - default color mode, true: color; false: gray
//
// force - ignore file time and force update
void update_correct_data(int init_dpi = 200, bool init_clr = true, bool force = false);
void load_correct_data_to_json(gb_json* jsn);
};