void menu_usart(void) { sprintf(lcd_line0,"ньхайх беднлнцн "); sprintf(lcd_line1,"%d %d %d ", usart_error_count, usart_last_error, usart_good_count); menu_common(); }
void menu_start(void) { sprintf(lcd_line0, "нюн моо яхярелю "); sprintf(lcd_line1, " клор-1 "); menu_common(); }
void menu_controls(void) { sprintf(lcd_line0,"бшундш "); lcd_line1[16] = 0; lcd_line1[SOFT_CONTROL_WATER_MODE0] = '0' + GET_WATER_MODE; lcd_line1[SOFT_CONTROL_WATER_MODE1] = ' '; lcd_line1[SOFT_CONTROL_COOLER_PUMP] = (TEST_SOFT_CONTROL(SOFT_CONTROL_COOLER_PUMP))?'у':'.'; lcd_line1[SOFT_CONTROL_EXTRUDER_PUMP] = (TEST_SOFT_CONTROL(SOFT_CONTROL_EXTRUDER_PUMP))?'щ':'.'; lcd_line1[SOFT_CONTROL_COOLER_TUBE] = (TEST_SOFT_CONTROL(SOFT_CONTROL_COOLER_TUBE))?'о':'.'; lcd_line1[SOFT_CONTROL_PRESSURE] = (TEST_SOFT_CONTROL(SOFT_CONTROL_PRESSURE))?'б':'.'; lcd_line1[SOFT_CONTROL_SG] = (TEST_SOFT_CONTROL(SOFT_CONTROL_SG))?'я':'.'; lcd_line1[SOFT_CONTROL_DRIER] = (TEST_SOFT_CONTROL(SOFT_CONTROL_DRIER))?'н':'.'; lcd_line1[SOFT_CONTROL_GERMO] = (TEST_SOFT_CONTROL(SOFT_CONTROL_GERMO))?'ц':'.'; lcd_line1[SOFT_LAMP_STOP - 1] = (TEST_SOFT_CONTROL(SOFT_LAMP_STOP))?'S':'.'; lcd_line1[SOFT_CONTROL_FOIL_LED - 1] = (TEST_SOFT_CONTROL(SOFT_CONTROL_FOIL_LED))?'к':'.'; lcd_line1[SOFT_CONTROL_BUNKER_MOTOR - 1] = (TEST_SOFT_CONTROL(SOFT_CONTROL_BUNKER_MOTOR))?'а':'.'; lcd_line1[SOFT_CONTROL_TRACTOR_LOCK - 1] = (TEST_SOFT_CONTROL(SOFT_CONTROL_TRACTOR_LOCK))?'р':'.'; lcd_line1[SOFT_SIREN_MODE0 - 1] = ' '; lcd_line1[SOFT_SIREN_MODE1 - 1] = '0' + GET_SIREN_MODE; lcd_line1[15] = ' '; menu_common(); }
void menu_key_mapping(void) { lcd_set_blink(LMENU, LB_SPC); menu_common(menu_key_mapping_func, NULL, MCF_NONE); lcd_set_blink(LMENU, LB_OFF); config_model_save(); apply_model_config(); menu_buttons_initialize(); }
static void menu_channel(u8 end_channel, u8 use_adc, u8 forced_values, menu_channel_subfunc_t subfunc) { menu_channel_t p; p.end_channel = end_channel; p.use_adc = use_adc; p.forced_values = forced_values; p.func = subfunc; menu_adc_direction = 0; menu_common(menu_channel_func, &p, MCF_NONE); config_model_save(); }
void menu_sensors(void) { uint8_t idx; sprintf(lcd_line0, "бундш "); for (idx = 0; idx < 3; idx++) lcd_line0[13 + idx] = (TESTBIT(secondary_sensors, idx))?'1':'.'; for (idx = 0; idx < 16; idx++) lcd_line1[idx] = (TEST_SENSOR(idx))?'1':'.'; menu_common(); }
void menu_debug(void) { sprintf(lcd_line0,"пефхл нркюдйх "); sprintf(lcd_line1,"%s ", (g_debug_mode)?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); g_debug_mode ^= 0x01; beep_ms(50); } menu_common(); }
void menu_empty_bath(void) { sprintf(lcd_line0,"якхб бюммш "); sprintf(lcd_line1,"%s ", g_empty_bath_state?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); g_empty_bath_state ^= 0x01; SET_WATER_MODE(WATER_MODE_MANUAL); beep_ms(50); } menu_common(); }
void menu_usb(void) { sprintf(lcd_line0,"ябъгэ я йнл.оюм."); sprintf(lcd_line1,"%s ", (usb_on)?"еярэ":"мер"); if (!usb_on) if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); usb_on = 1; beep_ms(50); } menu_common(); }
void menu_foil_led(void) { sprintf(lcd_line0,"йнмрпнкэ тнкэцх "); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_FOIL_LED))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_FOIL_LED)) SOFT_CONTROL_OFF(SOFT_CONTROL_FOIL_LED); else SOFT_CONTROL_ON(SOFT_CONTROL_FOIL_LED); beep_ms(50); } menu_common(); }
void menu_cooler_tube(void) { sprintf(lcd_line0,"опедб.нукюфдемхе"); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_COOLER_TUBE))?"бйкчвемн":"бшйкчвемн"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_COOLER_TUBE)) SOFT_CONTROL_OFF(SOFT_CONTROL_COOLER_TUBE); else SOFT_CONTROL_ON(SOFT_CONTROL_COOLER_TUBE); beep_ms(50); } menu_common(); }
void menu_drier(void) { sprintf(lcd_line0,"нясьхрекэ "); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_DRIER))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_DRIER)) SOFT_CONTROL_OFF(SOFT_CONTROL_DRIER); else SOFT_CONTROL_ON(SOFT_CONTROL_DRIER); beep_ms(50); } menu_common(); }
void menu_pressure(void) { sprintf(lcd_line0,"бнгдсу б рпсае "); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_PRESSURE))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_PRESSURE)) SOFT_CONTROL_OFF(SOFT_CONTROL_PRESSURE); else SOFT_CONTROL_ON(SOFT_CONTROL_PRESSURE); beep_ms(50); } menu_common(); }
void menu_germo(void) { sprintf(lcd_line0,"цеплерхгюжхъ "); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_GERMO))?"бйкчвемю":"бшйкчвемю"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_GERMO)) SOFT_CONTROL_OFF(SOFT_CONTROL_GERMO); else SOFT_CONTROL_ON(SOFT_CONTROL_GERMO); beep_ms(50); } menu_common(); }
void menu_extruder_pump(void) { sprintf(lcd_line0,"мюяня нукюфдемхъ"); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_EXTRUDER_PUMP))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_EXTRUDER_PUMP)) SOFT_CONTROL_OFF(SOFT_CONTROL_EXTRUDER_PUMP); else SOFT_CONTROL_ON(SOFT_CONTROL_EXTRUDER_PUMP); beep_ms(50); } menu_common(); }
void menu_cooler_pump(void) { sprintf(lcd_line0,"мюяня ункнд.сяр."); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_COOLER_PUMP))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_COOLER_PUMP)) SOFT_CONTROL_OFF(SOFT_CONTROL_COOLER_PUMP); else SOFT_CONTROL_ON(SOFT_CONTROL_COOLER_PUMP); beep_ms(50); } menu_common(); }
void menu_sg(void) { sprintf(lcd_line0,"ябюп. цнкнбйю. "); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_SG))?"опхфюрю":"ондмърю"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_SG)) SOFT_CONTROL_OFF(SOFT_CONTROL_SG); else SOFT_CONTROL_ON(SOFT_CONTROL_SG); beep_ms(50); } menu_common(); }
void menu_bunker_motor(void) { sprintf(lcd_line0,"дбхц. мюйнохрекъ"); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_BUNKER_MOTOR))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_BUNKER_MOTOR)) SOFT_CONTROL_OFF(SOFT_CONTROL_BUNKER_MOTOR); else SOFT_CONTROL_ON(SOFT_CONTROL_BUNKER_MOTOR); beep_ms(50); } menu_common(); }
void menu_water_mode(void) { uint16_t water_mode; sprintf(lcd_line0,"спнбемэ бндш "); sprintf(lcd_line1,"%d ", GET_WATER_MODE); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); water_mode = GET_WATER_MODE; water_mode++; if (2 < water_mode) water_mode = 0; SET_WATER_MODE(water_mode); beep_ms(50); } menu_common(); }
void menu_tractor_lock(void) { sprintf(lcd_line0,"опхфхл рс "); sprintf(lcd_line1,"%s ", (TEST_SOFT_CONTROL(SOFT_CONTROL_TRACTOR_LOCK))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_SOFT_CONTROL(SOFT_CONTROL_TRACTOR_LOCK)) SOFT_CONTROL_OFF(SOFT_CONTROL_TRACTOR_LOCK); else SOFT_CONTROL_ON(SOFT_CONTROL_TRACTOR_LOCK); beep_ms(50); } menu_common(); }
static void menu_model(u8 saveas) { u8 model = cg.model; if (saveas) lcd_set_blink(LMENU, LB_SPC); menu_common(menu_model_func, &model, MCF_ENTER); // if new model choosed, save it if (model != cg.model) { config_set_model(model); if (saveas) { // save to new model position config_model_save(); } else { // load selected model menu_load_model(); } } if (saveas) lcd_set_blink(LMENU, LB_OFF); }
void menu_clock(void) { uint8_t yr; uint8_t mnth; uint8_t d; uint8_t hh; uint8_t mm; uint8_t ss; yr = YEAR; mnth = MONTH; d = D_MONTH; hh = HOURS; mm = MINUTES; ss = SECONDS; sprintf(lcd_line0, "%02d-%02d-%02d ", d, mnth, yr); sprintf(lcd_line1, "%02d:%02d:%02d ", hh, mm, ss); menu_common(); }
void menu_siren_mode(void) { uint16_t siren_mode; sprintf(lcd_line0,"пефхл яхпемш "); sprintf(lcd_line1,"%d ", GET_SIREN_MODE); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); siren_mode = GET_SIREN_MODE; siren_mode++; if (3 < siren_mode) siren_mode = 0; SET_SIREN_MODE(siren_mode); beep_ms(50); } menu_common(); }
void menu_work_pump(void) { sprintf(lcd_line0,"мюяня жхпйскъжхх"); sprintf(lcd_line1,"%s ", (TEST_CONTROL(CONTROL_WORK_BATH_PUMP))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_CONTROL(CONTROL_WORK_BATH_PUMP)) CONTROL_OFF(CONTROL_WORK_BATH_PUMP); else CONTROL_ON(CONTROL_WORK_BATH_PUMP); SET_WATER_MODE(WATER_MODE_MANUAL); beep_ms(50); } menu_common(); }
void menu_fillup_pump(void) { sprintf(lcd_line0,"мюяня мюонкмемхъ"); sprintf(lcd_line1,"%s ", (TEST_CONTROL(CONTROL_FILLUP_BATH_PUMP))?"бйкчвем":"бшйкчвем"); if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); if (TEST_CONTROL(CONTROL_FILLUP_BATH_PUMP)) CONTROL_OFF(CONTROL_FILLUP_BATH_PUMP); else CONTROL_ON(CONTROL_FILLUP_BATH_PUMP); SET_WATER_MODE(WATER_MODE_MANUAL); beep_ms(50); } menu_common(); }
static void menu_abs(void) { menu_common(menu_abs_func, NULL, (u8)(MCF_ENTER | MCF_SET_ONLY)); config_model_save(); }
static void menu_name(void) { menu_common(menu_name_func, NULL, MCF_SET_ONLY); config_model_save(); }
void menu_scan_sensors(void) { static uint8_t scan_mode_on = 1; static uint8_t sensor = 0; static uint8_t timer_id = 0; if (KEY_PRESSED(KEY_ENTER)) { CLEAR_KEY_PRESSED(KEY_ENTER); scan_mode_on ^= 0x01; beep_ms(50); } if ((scan_mode_on) && (0 == timer_id)) timer_id = start_timer(1000); if (0 != timer_id) { if (!timer_value(timer_id)) { stop_timer(timer_id); timer_id = 0; if (scan_mode_on) sensor++; if (SENSOR_COUNT <= sensor) sensor = 0; } } if (!scan_mode_on) { if (KEY_PRESSED(KEY_UP)) { CLEAR_KEY_PRESSED(KEY_UP); if (0 == sensor) sensor = SENSOR_COUNT; sensor--; beep_ms(50); } if (KEY_PRESSED(KEY_DOWN)) { CLEAR_KEY_PRESSED(KEY_DOWN); sensor++; if (SENSOR_COUNT <= sensor) sensor = 0; beep_ms(50); } } sprintf(lcd_line0, "%s ", sensor_text[sensor][0]); if (SENSOR_FOIL_ENCODER == sensor_id[sensor]) sprintf(lcd_line1, "%s %u ", (TEST_SENSOR(sensor_id[sensor]))?sensor_text[sensor][1]:sensor_text[sensor][2], max_time_counter); else if (sensor_id[sensor] < 24) // 24 = primary sensors count sprintf(lcd_line1, "%s ", (TEST_SENSOR(sensor_id[sensor]))?sensor_text[sensor][1]:sensor_text[sensor][2]); else sprintf(lcd_line1, "%s ", (TESTBIT(secondary_sensors, sensor_id[sensor] - 24))?sensor_text[sensor][1]:sensor_text[sensor][2]); menu_common(); }
void menu_version(void) { sprintf(lcd_line0, "бепяхъ он: "); sprintf(lcd_line1, "%-16s", FW_VERSION); menu_common(); }