BASIC Programmability
News and Updates
30 March 2010
New TR610 Firmware and Manuals
We have just posted a new major version (3.03.00) of the TR610 firmware, along with its source code. This is a major release, bumping TR610 from 2.x to 3.x, and adding a new "white list" feature. The manual has also been extensively updated. Get the files at the Downloads page.
16 November 2009
New TR610 Firmware
We have just posted a new version (2.02.05) of the TR610 firmware, along with its source code. It's mainly a bugfix release, with new LCD support and some changes in web login delay. Get it at the Downloads page.
10 August 2009
New TR610 Model with Mifare
In addition to the existing TR610R, we have now released the TR610MF equipped with a Mifare proximity reader.
|
Changing Beeps
By default, each of the buttons on the TR610 emits a different beep when pressed. This is an accessibility feature, meant to help persons hard of sight to easily use the terminal.
However, you may want to change this for some reason. In this example, we will show you how to change all the beeps so they are the same.
This function is related to the user interface of the clock, and its code is found under ui_clock.tbs.
Edit ui_clock.tbs and locate the following code:
public sub ui_clock_key_proc(key_event as pl_kp_event_codes, key_code as byte)
'The keypad event process for the ui_clock module
dim s as string(4)
dim ss as string(15)
dim temp_etype as event_type
temp_etype = etype
select case key_event
case PL_KP_EVENT_PRESSED:
select case key_code
case keycodeF1:
beep.divider = 20000
beep.play("B-",PL_BEEP_CANINT)
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_IN
s = "1000"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_IN
case keycodeF2:
beep.divider = 20000
beep.play("B-B-*",PL_BEEP_CANINT)
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_OUT
s = "0100"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_OUT
case keycodeF3:
beep.divider = 25000
beep.play("B-",PL_BEEP_CANINT)
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_TEMPIN
s = "0010"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_TEMP_IN
case keycodeF4
beep.divider = 25000
beep.play("B-B-*",PL_BEEP_CANINT)
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_TEMPOUT
s = "0001"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_TEMP_OUT
As you can see, the code is composed of a select case statement for determining the action of each of the terminal's buttons. What we should do is take the beep code out of each specific case, and put it at the top so that it applies to all cases. See below:
public sub ui_clock_key_proc(key_event as pl_kp_event_codes, key_code as byte)
'The keypad event process for the ui_clock module
dim s as string(4)
dim ss as string(15)
dim temp_etype as event_type
temp_etype = etype
select case key_event
case PL_KP_EVENT_PRESSED:
beep.divider = 20000
beep.play("B-",PL_BEEP_CANINT)
select case key_code
case keycodeF1:
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_IN
s = "1000"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_IN
case keycodeF2:
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_OUT
s = "0100"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_OUT
case keycodeF3:
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_TEMPIN
s = "0010"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_TEMP_IN
case keycodeF4
key_led_pressed(key_code)
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,yes)
etype = EVENT_TEMPOUT
s = "0001"
lcd_display_button(BMP_IN_XOFFSET,BMP_OUT_XOFFSET,BMP_TIN_XOFFSET,BMP_TOUT_XOFFSET,s,no,no)
ss = CLOCK_TEMP_OUT
... and that's it. From now on, all buttons will sound the same.
© GigaTMS 2008 Tel: 886-2-26954214 E-mail: promag@gigatms.com.tw
|