• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ display_symbol函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中display_symbol函数的典型用法代码示例。如果您正苦于以下问题:C++ display_symbol函数的具体用法?C++ display_symbol怎么用?C++ display_symbol使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了display_symbol函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: display_heartrate

// *************************************************************************************************
// @fn          display_heartrate
// @brief       Heart rate display routine. 
// @param       u8 line	LINE1
//				u8 update	DISPLAY_LINE_UPDATE_FULL, DISPLAY_LINE_UPDATE_PARTIAL, DISPLAY_LINE_CLEAR
// @return      none
// *************************************************************************************************
void display_heartrate(u8 line, u8 update)
{
	u8 * str;
	
	if (update != DISPLAY_LINE_CLEAR)
	{
		if (is_bluerobin())
		{
			str = itoa(sBlueRobin.heartrate, 3, 2);
			display_chars(LCD_SEG_L1_2_0, str, SEG_ON);
		}
		else
		{
			display_chars(LCD_SEG_L1_2_0, (u8 *)"---", SEG_ON);
		}
	}
	
	// Redraw whole screen
	if (!is_bluerobin())
	{
		if (update == DISPLAY_LINE_UPDATE_FULL)	
		{
			 display_symbol(LCD_ICON_HEART, SEG_ON);
		}
		else if (update == DISPLAY_LINE_CLEAR)
		{
			// Clear heart when not connected
			display_symbol(LCD_ICON_HEART, SEG_OFF);
		}
	}
}
开发者ID:CaptFrank,项目名称:Black-Box-Mouse-Interface,代码行数:38,代码来源:bluerobin.c


示例2: display_alarm

// *************************************************************************************************
// @fn          display_alarm
// @brief       Display alarm time. 24H / 12H time format.
// @param       u8 line	LINE1, LINE2
//		u8 update	DISPLAY_LINE_UPDATE_FULL, DISPLAY_LINE_CLEAR
// @return      none
// *************************************************************************************************
void display_alarm(u8 line, u8 update)
{
	
	if (update == DISPLAY_LINE_UPDATE_FULL)			
	{
	  display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sAlarm.hour, 2, 1, SEG_ON);
	  display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), _itoa(sAlarm.minute, 2, 0), SEG_ON);
	  display_symbol(switch_seg(line, LCD_SEG_L1_COL, LCD_SEG_L2_COL0), SEG_ON);

	  // Show blinking alarm icon
	  display_symbol(LCD_ICON_ALARM, SEG_ON_BLINK_ON);
	}
	else if (update == DISPLAY_LINE_CLEAR)			
	{
	  // Clean up function-specific segments before leaving function
	  display_symbol(LCD_SYMB_AM, SEG_OFF);

	  // Clear / set alarm icon
	  if (sAlarm.state == ALARM_DISABLED)
	  {
	    display_symbol(LCD_ICON_ALARM, SEG_OFF_BLINK_OFF);
	  }
	  else
	  {
	    display_symbol(LCD_ICON_ALARM, SEG_ON_BLINK_OFF);
	  }
	}
}
开发者ID:JBeaudaux,项目名称:Blueprint,代码行数:35,代码来源:alarm.c


示例3: check_ucs

// *************************************************************************************************
// @fn          check_ucs
// @brief       Check the Unified Clock System.
// @param       none
// @return      none
// *************************************************************************************************
void check_ucs(void) 
{
    // Incremet counter every minute if started
    if(sUcsResetHandling.counter != 0) 
    { 
        sUcsResetHandling.counter++; 
        // Reset UCS twice: one times after one minute and a second time after an other minute
        if((sUcsResetHandling.counter == 2) || (sUcsResetHandling.counter == 3))
        { 
          // Reset UCS
          __disable_interrupt();
          init_ucs();
          __enable_interrupt();
        }
        // Switch off symbol on display after 12 hours (60*12=720 minutes) and stop counter
        if(sUcsResetHandling.counter >= 720) 
        { 
          sUcsResetHandling.counter = 0;
          display_symbol(LCD_SYMB_MAX, SEG_OFF);
        }
    }
        
    // Check UCS for failure
    if((SFRIFG1 & OFIFG) != 0)
    {
        display_symbol(LCD_SYMB_MAX, SEG_ON);
        if(sUcsResetHandling.status == UCSRESET_AUTO) 
        { 
          // Start counter
          sUcsResetHandling.counter = 1;
        }
    }
}
开发者ID:flamewow,项目名称:chronus,代码行数:39,代码来源:clock.c


示例4: menumode_handler

static void menumode_handler(void)
{
	if (ports_button_pressed(PORTS_BTN_STAR, 0)) {
		/* exit mode mode */
		menumode.enabled = 0;

		/* clear both lines but keep symbols! */
		display_clear(0, 1);
		display_clear(0, 2);

		/* turn off up/down symbols */
		display_symbol(0, LCD_SYMB_ARROW_UP, SEG_OFF);
		display_symbol(0, LCD_SYMB_ARROW_DOWN, SEG_OFF);

		/* stop blinking name of current selected module */
		display_chars(0, LCD_SEG_L2_4_0, NULL, BLINK_OFF);

		/* activate item */
		if (menumode.item->activate_fn)
			menumode.item->activate_fn();

	} else if (ports_button_pressed(PORTS_BTN_UP, 0)) {
		menumode.item = menumode.item->next;
		display_chars(0, LCD_SEG_L2_4_0, menumode.item->name, SEG_SET);

	} else if (ports_button_pressed(PORTS_BTN_DOWN, 0)) {
		menumode.item = menumode.item->prev;
		display_chars(0, LCD_SEG_L2_4_0, menumode.item->name, SEG_SET);
	}
}
开发者ID:rafaelfini,项目名称:openchronos-ng-elf,代码行数:30,代码来源:openchronos.c


示例5: altitude_activate

static void altitude_activate(void)
{

	/* display -- symbol while a measure is not performed */
	display_chars(0, LCD_SEG_L1_3_0, "----", SEG_SET);
    update(SYS_MSG_FAKE);

	sys_messagebus_register(&update, consumption_array[consumption-1]);
    
    sys_messagebus_register(&time_callback, SYS_MSG_RTC_MINUTE
                        | SYS_MSG_RTC_HOUR
#ifdef CONFIG_MOD_CLOCK_BLINKCOL
                        | SYS_MSG_RTC_SECOND
#endif
    );
    
    lcd_screens_create(6);
    display_chars(ALT_SCREEN_CLIMB, LCD_SEG_L2_5_0, " CLIMB", SEG_SET);
    display_symbol(ALT_SCREEN_CLIMB, LCD_SEG_L1_DP0, SEG_ON);
    display_symbol(ALT_SCREEN_CLIMB, LCD_UNIT_L1_PER_S, SEG_ON);
    display_chars(ALT_SCREEN_MIN,   LCD_SEG_L2_5_0, " MIN  ", SEG_SET);
    display_chars(ALT_SCREEN_MAX,   LCD_SEG_L2_5_0, " MAX  ", SEG_SET);
    display_chars(ALT_SCREEN_ACC_N, LCD_SEG_L2_5_0, " ACC N", SEG_SET);
    display_chars(ALT_SCREEN_ACC_P, LCD_SEG_L2_5_0, " ACC P", SEG_SET);
}
开发者ID:KarolTx,项目名称:openchronos-ng,代码行数:25,代码来源:altitude.c


示例6: display_time

// *************************************************************************************************
// @fn          display_time
// @brief       Clock display routine. Supports 24H and 12H time format,
//              through the helper display_hours_with_12_24.
// @param       u8 line			LINE1
//				u8 update		DISPLAY_LINE_UPDATE_FULL, DISPLAY_LINE_UPDATE_PARTIAL
// @return      none
// *************************************************************************************************
void display_time(u8 line, u8 update)
{
	// Partial and full update
	if (update == DISPLAY_LINE_UPDATE_PARTIAL || update == DISPLAY_LINE_UPDATE_FULL)
	{
	  if ( ( line == LINE1 && sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW ) || ( line == LINE2 && sTime.line2ViewStyle == DISPLAY_DEFAULT_VIEW ) )
	  {
	    // Display hours
#ifndef LZH
	        display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 1, SEG_ON);
#else
	        display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 0, SEG_ON);
#endif	        
	    // Display minute
	    display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), _itoa(sTime.minute, 2, 0), SEG_ON);
	    display_symbol(switch_seg(line, LCD_SEG_L1_COL, LCD_SEG_L2_COL0), SEG_ON_BLINK_ON);
	  }
	  else
	  {
	    // Display seconds
	    display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), _itoa(sTime.second, 2, 0), SEG_ON);
	    display_symbol(switch_seg(line, LCD_SEG_L1_DP1, LCD_SEG_L2_DP), SEG_ON);
	  }
	}
	else if (update == DISPLAY_LINE_CLEAR)
	{
	  display_symbol(switch_seg(line, LCD_SEG_L1_COL, LCD_SEG_L2_COL0), SEG_OFF_BLINK_OFF);
	  // Change display style to default (HH:MM)
	  sTime.line1ViewStyle = DISPLAY_DEFAULT_VIEW;
	  // Clean up AM/PM icon
	  display_symbol(LCD_SYMB_AM, SEG_OFF);
	}
}
开发者ID:Rossano,项目名称:ez430_ChibiOS,代码行数:41,代码来源:clock.c


示例7: temperature_deactivate

static void temperature_deactivate(void)
{
	sys_messagebus_unregister(&measure_temp);
	
	/* cleanup screen */
	display_symbol(0, LCD_UNIT_L1_DEGREE, SEG_OFF);
	display_symbol(0, LCD_SEG_L1_DP0, SEG_OFF);
}
开发者ID:KarolTx,项目名称:openchronos-ng,代码行数:8,代码来源:temperature.c


示例8: display_alarm

// *************************************************************************************************
// @fn          display_alarm
// @brief       Display alarm time. 24H / 12H time format.
// @param       u8 line	LINE1, LINE2
//		u8 update	DISPLAY_LINE_UPDATE_FULL, DISPLAY_LINE_CLEAR
// @return      none
// *************************************************************************************************
void display_alarm(u8 line, u8 update)
{
#ifndef CONFIG_METRIC_ONLY 
	u8 hour12;
#endif
	
	if (update == DISPLAY_LINE_UPDATE_FULL)			
	{
#ifdef CONFIG_METRIC_ONLY
		display_chars(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), itoa(sAlarm.hour, 2, 0), SEG_ON); 
#else
		if (sys.flag.use_metric_units)
		{
			// Display 24H alarm time "HH:MM"
			display_chars(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), itoa(sAlarm.hour, 2, 0), SEG_ON); 
		}
		else
		{
			// Display 12H alarm time "HH:MM" + AM/PM
			hour12 = convert_hour_to_12H_format(sAlarm.hour);
			display_chars(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), itoa(hour12, 2, 0), SEG_ON); 	
			
			// Display AM/PM symbol
			display_am_pm_symbol(sAlarm.hour);		
		}
#endif
		display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), itoa(sAlarm.minute, 2, 0), SEG_ON); 
		display_symbol(switch_seg(line, LCD_SEG_L1_COL, LCD_SEG_L2_COL0), SEG_ON);

		// Show blinking alarm icon
		display_symbol(LCD_ICON_ALARM, SEG_ON_BLINK_ON);

//		// If alarm is enabled, show icon
// 		if (sAlarm.state == ALARM_ENABLED)
// 		{
// 			display_symbol(LCD_ICON_ALARM, SEG_ON_BLINK_OFF);
// 		}
//		// When alarm is disabled, blink icon to indicate that this is not current time!
// 		else if (sAlarm.state == ALARM_DISABLED) 
// 		{
// 		}
	}
	else if (update == DISPLAY_LINE_CLEAR)			
	{
		// Clean up function-specific segments before leaving function
		display_symbol(LCD_SYMB_AM, SEG_OFF);
		
		// Clear / set alarm icon
		if (sAlarm.state == ALARM_DISABLED) 
		{
			display_symbol(LCD_ICON_ALARM, SEG_OFF_BLINK_OFF);
		}
		else
		{
			display_symbol(LCD_ICON_ALARM, SEG_ON_BLINK_OFF);
		}
	}
}
开发者ID:epall,项目名称:OpenChronos,代码行数:65,代码来源:alarm.c


示例9: it_tx_cmd

void it_tx_cmd(uint8_t prefix, uint8_t cmd)
{
    uint8_t p = 0;
    uint8_t rprefix;
    uint8_t it_buff[INTERTECHNO_SEQ_SIZE];
    int8_t i;

    rprefix = rotate_byte(prefix);

    // replace 1 with 0x8e and 0 with 0x88
    for (i = 7; i >= 0; i--) {
        if (rprefix & (1 << i)) {
            it_buff[p] = 0x8e;
        } else {
            it_buff[p] = 0x88;
        }
        p++;
    }

    for (i = 3; i >= 0; i--) {
        if (cmd & (1 << i)) {
            it_buff[p] = 0x8e;
        } else {
            it_buff[p] = 0x88;
        }
        p++;
    }

    // sync sequence
    it_buff[p++] = 0x80;
    it_buff[p++] = 0;
    it_buff[p++] = 0;
    it_buff[p] = 0;

    // display RF symbol
    display_symbol(0, LCD_ICON_BEEPER1, SEG_ON);
    display_symbol(0, LCD_ICON_BEEPER2, SEG_ON);
    display_symbol(0, LCD_ICON_BEEPER3, SEG_ON);

    it_rf_init();

    Strobe(RF_SCAL);            // re-calibrate radio

    // set an interrupt to trigger when the packet is fully sent
    RF1AIES |= BIT9;
    RF1AIFG &= ~BIT9;           // Clear pending interrupts
    RF1AIE |= BIT9;             // Enable TX end-of-packet interrupt

    // factory remotes send the command sequence 4 times
    for (i = 0; i < 4; i++) {
        WriteBurstReg(RF_TXFIFOWR, it_buff, INTERTECHNO_SEQ_SIZE);
    }
    Strobe(RF_STX);             // transmit

}
开发者ID:KarolTx,项目名称:openchronos-rfsw,代码行数:55,代码来源:intertechno.c


示例10: stopwatch_activated

/* Activation of the module */
static void stopwatch_activated() {
	display_symbol(0, LCD_SEG_L2_COL0, SEG_ON);
	display_symbol(0, LCD_SEG_L2_COL1, SEG_ON);
	if (sSwatch_conf.state == SWATCH_MODE_BACKGROUND) {
		sSwatch_conf.state = SWATCH_MODE_ON;
		return;
	}

	sys_messagebus_register(&stopwatch_event, SYS_MSG_TIMER_20HZ);
	drawStopWatchScreen();
}
开发者ID:BenjaminSoelberg,项目名称:openchronos-ng-elf,代码行数:12,代码来源:stopwatch.c


示例11: it_tx_end

static void it_tx_end(enum sys_message msg)
{
    Strobe(RF_SIDLE);           // IDLE
    Strobe(RF_SFTX);            // flush TXFIFO
    Strobe(RF_SPWD);            // power-down mode

    // clear RF symbol
    display_symbol(0, LCD_ICON_BEEPER1, SEG_OFF);
    display_symbol(0, LCD_ICON_BEEPER2, SEG_OFF);
    display_symbol(0, LCD_ICON_BEEPER3, SEG_OFF);
}
开发者ID:KarolTx,项目名称:openchronos-rfsw,代码行数:11,代码来源:intertechno.c


示例12: display_temp_symbols

//* ************************************************************************************************
/// @fn			display_temp_symbols(int8_t disp)
/// @brief		Display the current unit symbol & +/- value indicator.
/// @param		disp Toogle on/off the symbols
/// @return		none
//* ************************************************************************************************
void display_temp_symbols(int8_t disp)
{
    if(disp == 0) {
        display_symbol(0,LCD_UNIT_L1_DEGREE, SEG_OFF);
        display_symbol(0, LCD_SYMB_ARROW_UP, SEG_OFF);
        display_symbol(0, LCD_SYMB_ARROW_DOWN, SEG_OFF);
    } else {
        display_symbol(0,LCD_SEG_L1_DP1, SEG_ON);
        display_symbol(0,LCD_UNIT_L1_DEGREE, SEG_ON);
    }
}
开发者ID:freespace,项目名称:openchronos-ng,代码行数:17,代码来源:temperature.c


示例13: stop_eggtimer_alarm

// *************************************************************************************************
// @fn          stop_eggtimer_alarm
// @brief       Puts eggtimer in STOP mode, halts alarm mode and buzzing if active, updates eggtimer
//			symbol. Safe to call, even if eggtimer menu not active.
// @param       none
// @return      none
// *************************************************************************************************
void stop_eggtimer_alarm(void)
{
	sEggtimer.state = EGGTIMER_STOP;
	sEggtimer.duration = EGGTIMER_ALARM_DURATION;
	if (eggtimer_visible()) {
		display_symbol(LCD_ICON_RECORD, SEG_ON_BLINK_OFF);
	}
	else {
		display_symbol(LCD_ICON_RECORD, SEG_OFF_BLINK_OFF);
	}
	stop_buzzer(); // FIXME: needs to play friendly with other buzzer-using modules (e.g. alarm)
}
开发者ID:autoscatto,项目名称:openchronos,代码行数:19,代码来源:eggtimer.c


示例14: _display_l2_clean

//
// Common function to turn off various symbols we use in our view modes.
//
void
_display_l2_clean( void ) 
{
#if ( VARIO_VZ || VARIO_ALTMAX ) 
   display_symbol( LCD_SYMB_MAX, SEG_OFF);
#endif

#if VARIO_F_TIME
   display_symbol(LCD_SEG_L2_COL1, SEG_OFF);
   display_symbol(LCD_SEG_L2_COL0, SEG_OFF);
#endif
}
开发者ID:TeMPOraL,项目名称:OpenChronos,代码行数:15,代码来源:vario.c


示例15: display_sort

void display_sort(Z3_context c, FILE * out, Z3_sort ty) 
{
  switch (Z3_get_sort_kind(c, ty)) {
  case Z3_UNINTERPRETED_SORT:
    display_symbol(c, out, Z3_get_sort_name(c, ty));
    break;
    /*     case Z3_BOOL_SORT: */
    /*         fprintf(out, "bool"); */
    /*         break; */
  case Z3_INT_SORT:
    fprintf(out, "int");
    break;
  case Z3_REAL_SORT:
    fprintf(out, "real");
    break;
    /*     case Z3_BV_SORT: */
    /*         fprintf(out, "bv%d", Z3_get_bv_sort_size(c, ty)); */
    /*         break; */
  case Z3_ARRAY_SORT: 
    fprintf(out, "[");
    display_sort(c, out, Z3_get_array_sort_domain(c, ty));
    fprintf(out, "->");
    display_sort(c, out, Z3_get_array_sort_range(c, ty));
    fprintf(out, "]");
    break;
    /*     case Z3_DATATYPE_SORT: */
    /* 		if (Z3_get_datatype_sort_num_constructors(c, ty) != 1)  */
    /* 		{ */
    /* 			fprintf(out, "%s", Z3_sort_to_string(c,ty)); */
    /* 			break; */
    /* 		} */
    /* 		{ */
    /*         unsigned num_fields = Z3_get_tuple_sort_num_fields(c, ty); */
    /*         unsigned i; */
    /*         fprintf(out, "("); */
    /*         for (i = 0; i < num_fields; i++) { */
    /*             Z3_func_decl field = Z3_get_tuple_sort_field_decl(c, ty, i); */
    /*             if (i > 0) { */
    /*                 fprintf(out, ", "); */
    /*             } */
    /*             display_sort(c, out, Z3_get_range(c, field)); */
    /*         } */
    /*         fprintf(out, ")"); */
    /*         break; */
    /* 		} */
  default:
    fprintf(out, "unknown[");
    display_symbol(c, out, Z3_get_sort_name(c, ty));
    fprintf(out, "]");
    break;
  }
}
开发者ID:tracer-x,项目名称:tracer,代码行数:52,代码来源:extern_solver.z3.c


示例16: start_simpliciti_tx_only

// *************************************************************************************************
// @fn          start_simpliciti_tx_only
// @brief       Start SimpliciTI (tx only). 
// @param       simpliciti_state_t		SIMPLICITI_ACCELERATION, SIMPLICITI_BUTTONS
// @return      none
// *************************************************************************************************
void start_simpliciti_tx_only(simpliciti_mode_t mode)
{
  	

	
	
	// Turn on beeper icon to show activity
	display_symbol(LCD_ICON_BEEPER1, SEG_ON_BLINK_ON);
	

	
	// Prepare radio for RF communication
	open_radio();

	// Set SimpliciTI mode
	sRFsmpl.mode = mode;
	
	// Set SimpliciTI timeout to save battery power
	sRFsmpl.timeout = SIMPLICITI_TIMEOUT; 
		
	// Start SimpliciTI stack. Try to link to access point.
	// Exit with timeout or by a button DOWN press.
	if (simpliciti_link())
	{
		

		// Enter TX only routine. This will transfer button events and/or acceleration data to access point.
		simpliciti_main_tx_only();
	}

	// Set SimpliciTI state to OFF
	sRFsmpl.mode = SIMPLICITI_OFF;

	// Stop acceleration sensor
	as_stop();

	// Powerdown radio
	close_radio();
	
	// Clear last button events

	BUTTONS_IFG = 0x00;  
	button.all_flags = 0;
	
	// Clear icons
	display_symbol(LCD_ICON_BEEPER1, SEG_OFF_BLINK_OFF);

	
 	
	
}
开发者ID:lboroEESE-12ELD002,项目名称:12ELD002-Group-I,代码行数:57,代码来源:rfsimpliciti.c


示例17: display_time

// *************************************************************************************************
// @fn          display_time
// @brief       Clock display routine. Supports 24H and 12H time format,
//              through the helper display_hours_with_12_24.
// @param       uint8_t line			LINE1
//				uint8_t update		DISPLAY_LINE_UPDATE_FULL, DISPLAY_LINE_UPDATE_PARTIAL
// @return      none
// *************************************************************************************************
void display_time(uint8_t line, uint8_t update)
{
	// Partial update
	if (update == DISPLAY_LINE_UPDATE_PARTIAL)
	{
	  if(sTime.drawFlag != 0)
	  {
	    if (sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW)
	    {
	      switch(sTime.drawFlag)
	      {
	      case 3:
	        display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 1, SEG_ON);
	      case 2:
	        display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), itoa(sTime.minute, 2, 0), SEG_ON);
	      }
	    }
	    else
	    {
	      // Seconds are always updated
	      display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), itoa(sTime.second, 2, 0), SEG_ON);
	    }
	  }
	}
	else if (update == DISPLAY_LINE_UPDATE_FULL)
	{
	  // Full update
	  if ( ( line == LINE1 && sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW ) || ( line == LINE2 && sTime.line2ViewStyle == DISPLAY_DEFAULT_VIEW ) )
	  {
	    // Display hours
	    display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 1, SEG_ON);
	    // Display minute
	    display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), itoa(sTime.minute, 2, 0), SEG_ON);
	    display_symbol(switch_seg(line, LCD_SEG_L1_COL, LCD_SEG_L2_COL0), SEG_ON_BLINK_ON);
	  }
	  else
	  {
	    // Display seconds
	    display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), itoa(sTime.second, 2, 0), SEG_ON);
	    display_symbol(switch_seg(line, LCD_SEG_L1_DP1, LCD_SEG_L2_DP), SEG_ON);
	  }
	}
	else if (update == DISPLAY_LINE_CLEAR)
	{
	  display_symbol(switch_seg(line, LCD_SEG_L1_COL, LCD_SEG_L2_COL0), SEG_OFF_BLINK_OFF);
	  // Change display style to default (HH:MM)
	  sTime.line1ViewStyle = DISPLAY_DEFAULT_VIEW;
	  // Clean up AM/PM icon
	  display_symbol(LCD_SYMB_AM, SEG_OFF);
	}
}
开发者ID:GlennVDLocht,项目名称:dash7-ap-open-source-stack,代码行数:59,代码来源:clock.c


示例18: edit_unit_sel

void edit_unit_sel(uint8_t pos)
{	
	if(useMetric){
		display_chars(0, LCD_SEG_L1_2_1, "M", SEG_SET);
		display_symbol(0, LCD_UNIT_L1_M, SEG_ON);
		display_symbol(0, LCD_UNIT_L1_FT, SEG_OFF);
	}else{
		display_chars(0, LCD_SEG_L1_2_1, "FT", SEG_SET);
		display_symbol(0, LCD_UNIT_L1_M, SEG_OFF);
		display_symbol(0, LCD_UNIT_L1_FT, SEG_ON);
	}
	display_chars(0, LCD_SEG_L1_2_1, NULL, BLINK_ON);
	display_chars(0, LCD_SEG_L2_3_0, "UNIT", SEG_SET);
}
开发者ID:KarolTx,项目名称:openchronos-ng,代码行数:14,代码来源:altitude.c


示例19: display_date

// *************************************************************************************************
// @fn          display_date
// @brief       Display date in DD.MM format (metric units) or MM.DD (English units).
// @param       u8 line                 LINE1, LINE2
//                              u8 update               DISPLAY_LINE_UPDATE_FULL,
// DISPLAY_LINE_UPDATE_PARTIAL
// @return      none
// *************************************************************************************************
void display_date(u8 line, u8 update)
{
    u8 *str;

    if (update == DISPLAY_LINE_UPDATE_FULL)
    {
        if (sDate.display == DISPLAY_DEFAULT_VIEW)
        {
            // Convert day to string
            str = int_to_array(sDate.day, 2, 0);
            if (sys.flag.use_metric_units)
            {
                display_chars(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), str, SEG_ON);
            }
            else
            {
                display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), str, SEG_ON);
            }

            // Convert month to string
            str = int_to_array(sDate.month, 2, 0);
            if (sys.flag.use_metric_units)
            {
                display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), str, SEG_ON);
            }
            else
            {
                display_chars(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), str, SEG_ON);
            }

            // Display "." to separate day and month
            display_symbol(switch_seg(line, LCD_SEG_L1_DP1, LCD_SEG_L2_DP), SEG_ON);
        }
        else
        {
            // Convert year to string
            str = int_to_array(sDate.year, 4, 0);
            display_chars(switch_seg(line, LCD_SEG_L1_3_0, LCD_SEG_L2_3_0), str, SEG_ON);

            // Clear "."
            display_symbol(switch_seg(line, LCD_SEG_L1_DP1, LCD_SEG_L2_DP), SEG_OFF);
        }
    }
    else if (update == DISPLAY_LINE_CLEAR)
    {
        // Show day and month on display when coming around next time
        sDate.display = DISPLAY_DEFAULT_VIEW;
    }
}
开发者ID:amd989,项目名称:ezTOTP,代码行数:57,代码来源:date.c


示例20: display_eggtimer

// *************************************************************************************************
// @fn          display_eggtimer
// @brief       eggtimer user routine.
// @param       u8 line		LINE2
//		u8 update	DISPLAY_LINE_UPDATE_PARTIAL, DISPLAY_LINE_UPDATE_FULL
// @return      none
// *************************************************************************************************
void display_eggtimer(u8 line, u8 update)
{
	u8 * str;
	
	// Partial line update only
	if (update == DISPLAY_LINE_UPDATE_PARTIAL)
	{
		// Check draw flag to minimize workload
		switch(sEggtimer.drawFlag) 
		{
		    case 3: // Hours changed
			str = _itoa(sEggtimer.hours, 2, 0);
			display_chars(LCD_SEG_L2_5_4, str, SEG_ON);
		    case 2: // Minutes changed
			str = _itoa(sEggtimer.minutes, 2, 0);
			display_chars(LCD_SEG_L2_3_2, str, SEG_ON);
		    case 1: // Seconds changed
			str = _itoa(sEggtimer.seconds, 2, 0);
			display_chars(LCD_SEG_L2_1_0, str, SEG_ON);
		}
		sEggtimer.drawFlag = 0; // Clear draw flag
	}
	// Redraw whole line
	else if (update == DISPLAY_LINE_UPDATE_FULL)	
	{
		// Display HH:MM:SS		
		str = _itoa(sEggtimer.hours, 2, 0);
		display_chars(LCD_SEG_L2_5_4, str, SEG_ON);
		str = _itoa(sEggtimer.minutes, 2, 0);
		display_chars(LCD_SEG_L2_3_2, str, SEG_ON);
		str = _itoa(sEggtimer.seconds, 2, 0);
		display_chars(LCD_SEG_L2_1_0, str, SEG_ON);
		
		display_symbol(LCD_SEG_L2_COL1, SEG_ON);
		display_symbol(LCD_SEG_L2_COL0, SEG_ON);
		
		if (sEggtimer.state != EGGTIMER_STOP) { // Blink if running or alarm triggered
			display_symbol(LCD_ICON_RECORD, SEG_ON_BLINK_ON);
		}
		else { // Solid on if not running
			display_symbol(LCD_ICON_RECORD, SEG_ON_BLINK_OFF);
		}
	}
	else if (update == DISPLAY_LINE_CLEAR)
	{
		// Stop blinking icon only if eggtimer isn't running
		if (sEggtimer.state == EGGTIMER_STOP) display_symbol(LCD_ICON_RECORD, SEG_OFF);
	}
}
开发者ID:kwantam,项目名称:OpenChronos,代码行数:56,代码来源:eggtimer.c



注:本文中的display_symbol函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ display_time函数代码示例发布时间:2022-05-30
下一篇:
C++ display_string函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap