add silence modus

pressing STAR and UP for long time sets silence modus (no beep)
README updates
fertito
Daniel Poelzleithner 13 years ago
parent 467b812125
commit be00c6f7d9

@ -17,6 +17,8 @@ Patches for more (more efficient) compilers are welcome :-)
== HOWTO ==
Copy intrinsic.h into [msp430-gcc-path]/msp430/include/intrinsics.h
To configure your image, run:
make config
@ -32,6 +34,18 @@ It is HIGHLY suggested to make a clean build befor you flash the image with:
make clean main
== Problems ==
* Compile / Link problems:
If you get error messages like this one:
msp430/bin/ld: build/eZChronos.elf section `.text' will not fit in region `text'
.../msp430/bin/ld: section .vectors loaded at [000000000000ff80,000000000000ffff] overlaps section .text loaded at [0000000000008000,0000000000013343]
.../msp430/bin/ld: region `text' overflowed by 13250 bytes
collect2: ld returned 1 exit status
Your image is simply to large and will not fit into the flash. Try to disable some code with make config and try again :-)
== Difference to the TI Firmware ==
@ -41,4 +55,6 @@ It is HIGHLY suggested to make a clean build befor you flash the image with:
* Sleep Phase Clock
* The wireless flashing starts differently:
Select RFBSL, Press DOWN to unlock, Press # long to start
* No BlueRobin support. BlueRobin is a closed source binary blob.
We don't have a compatible object file for that
* Pressing STAR and UP long sets silent mode (no beep)

@ -273,7 +273,7 @@ __interrupt void PORT2_ISR(void)
}
// Trying to lock/unlock buttons?
if (button.flag.num && button.flag.down)
if (button.flag.num && button.flag.down || button.flag.star && button.flag.up)
{
// No buzzer output
buzzer = 0;
@ -289,7 +289,7 @@ __interrupt void PORT2_ISR(void)
stop_alarm();
button.all_flags = 0;
}
else if (!sys.flag.up_down_repeat_enabled)
else if (!sys.flag.up_down_repeat_enabled && !sys.flag.no_beep)
{
start_buzzer(1, CONV_MS_TO_TICKS(20), CONV_MS_TO_TICKS(150));
}

@ -257,6 +257,7 @@ __interrupt void TIMER0_A0_ISR(void)
#endif
{
static u8 button_lock_counter = 0;
static u8 button_beep_counter = 0;
// Disable IE
TA0CCTL0 &= ~CCIE;
@ -403,9 +404,23 @@ __interrupt void TIMER0_A0_ISR(void)
// -------------------------------------------------------------------
// Detect continuous button high states
if (BUTTON_STAR_IS_PRESSED && BUTTON_UP_IS_PRESSED)
{
if (button_beep_counter++ > LEFT_BUTTON_LONG_TIME)
{
// Toggle no_beep buttons flag
sys.flag.no_beep = ~sys.flag.no_beep;
// Trying to lock/unlock buttons?
if (BUTTON_NUM_IS_PRESSED && BUTTON_DOWN_IS_PRESSED)
// Show "beep / nobeep" message synchronously with next second tick
message.flag.prepare = 1;
if (sys.flag.no_beep) message.flag.type_no_beep_on = 1;
else message.flag.type_no_beep_off = 1;
// Reset button beep counter
button_beep_counter = 0;
}
} else if (BUTTON_NUM_IS_PRESSED && BUTTON_DOWN_IS_PRESSED) // Trying to lock/unlock buttons?
{
if (button_lock_counter++ > LEFT_BUTTON_LONG_TIME)
{

@ -321,7 +321,6 @@ void init_global_variables(void)
display.flag.full_update = 1;
#ifndef ISM_US
// Use metric units when displaying values
sys.flag.use_metric_units = 1;
#else
@ -573,6 +572,8 @@ void display_update(void)
if (message.flag.type_locked) memcpy(string, " LO?T", 6);
else if (message.flag.type_unlocked) memcpy(string, " OPEN", 6);
else if (message.flag.type_lobatt) memcpy(string, "LOBATT", 6);
else if (message.flag.type_no_beep_on) memcpy(string, " SILNC", 6);
else if (message.flag.type_no_beep_off) memcpy(string, " BEEP", 6);
else if (message.flag.type_alarm_on)
{
memcpy(string, " ON", 4);
@ -583,6 +584,7 @@ void display_update(void)
memcpy(string, " OFF", 4);
line = LINE1;
}
// Clear previous content
clear_line(line);

@ -93,6 +93,7 @@ typedef union
u16 low_battery : 1; // 1 = Battery is low
u16 use_metric_units : 1; // 1 = Use metric units, 0 = use English units
u16 delay_over : 1; // 1 = Timer delay over
u16 no_beep : 1; // Don't beep on key press
} flag;
u16 all_flags; // Shortcut to all display flags (for reset)
} s_system_flags;
@ -128,6 +129,8 @@ typedef union
u16 type_lobatt : 1; // 1 = Show "lobatt" text in Line2
u16 type_alarm_on : 1; // 1 = Show " on" text in Line1
u16 type_alarm_off : 1; // 1 = Show " off" text in Line1
u16 type_no_beep_on : 1; // 1 = Show " beep" text in Line2
u16 type_no_beep_off : 1; // 1 = Show "nobeep" text in Line2
} flag;
u16 all_flags; // Shortcut to all message flags (for reset)
} s_message_flags;

@ -282,7 +282,7 @@ const struct menu menu_L2_CalDist =
const struct menu menu_L2_RFBSL =
{
FUNCTION(sx_rfbsl), // direct function
FUNCTION(dummy), // sub menu function
FUNCTION(mx_rfbsl), // sub menu function
FUNCTION(display_rfbsl), // display function
FUNCTION(update_time), // new display data
&menu_L2_Date,

Loading…
Cancel
Save