Skip to content

Commit 7647d0c

Browse files
committed
Removed splash image
1 parent f59abc3 commit 7647d0c

4 files changed

Lines changed: 11 additions & 17 deletions

File tree

! Startup.nxc

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
LockCode 1.0.1
2+
LockCode 1.0.2
33
Rename to "! Startup.nxc" and download to protect your NXT at startup.
44
When NXT is turned on it will prompt for a code. The first time the program is run it will ask you to set a code.
55
If you enter the wrong code, the NXT will flash a message, otherwise, the program will end, allowing you to access your NXT.
@@ -10,8 +10,6 @@
1010
The NXT Generation Robotics - http://robotics.bungeshea.com
1111
*/
1212

13-
#download "Splash.ric"
14-
1513
#define FILE "LockCode.dat" // Name of the file to store the code in
1614
#define FILESIZE 8
1715

@@ -26,7 +24,7 @@ struct LockCode{
2624

2725
LockCode code;
2826

29-
int GetNum(int x, int y = LCD_LINE5, int value = 0){
27+
int GetNum(int x, int y = LCD_LINE5, int value = 0) {
3028
while(!ButtonPressed(BTNCENTER,0)) // Poll for button presses until the center button is pressed
3129
{
3230
NumOut(x, y, value); // Draw the number on the screen
@@ -108,6 +106,7 @@ task lockCode()
108106
while(true)
109107
{
110108
TextOut(7, LCD_LINE2, "Enter passcode:", CLEAR_SCREEN);
109+
Wait(10);
111110
LockCode input = GetCode();
112111
if(input == code) // If the code that we've just entered matches the one stored on file...
113112
Stop(true); // Stop the program, allowing the user to access the NXT
@@ -120,17 +119,6 @@ task lockCode()
120119

121120
task main()
122121
{
123-
ClearScreen(); // Clear the screen, just in case the splash image does not exist
124-
GraphicOut(0, 0, "Splash.ric"); // Show the spalsh image
125122
PlayFileEx("! Startup.rso", Volume(), 0); // Play the startup sound
126-
Wait(1000); // Wait for the file to finish playing
127123
Precedes(turnOff, lockCode);
128124
}
129-
130-
/*
131-
Changelog
132-
133-
1.0.1 (2012-05-06): The NXT cannot be turned off for 10 seconds to prevent it from locking up.
134-
135-
1.0 (2012-05-04): Initial release
136-
*/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.bak
22
*.sym
33
*.zip
4+
nxtRICedit.RPA
45
archive/

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ There is also a program incuded in the zip file, `Delete Code.nxc` that will do
1111

1212
## Changelog
1313

14+
### 1.0.2
15+
Released on 2012-10-06
16+
* Removed splash image
17+
* Fixed sercurity issue with the user being able to turn off the NXT while the sound was being played
18+
1419
### 1.0.1
1520
Released on 2012-05-06
16-
The NXT cannot be turned off for 10 seconds to prevent it from locking up.
21+
* The NXT cannot be turned off for 10 seconds to prevent it from locking up.
1722

1823
### 1.0
1924
Released on 2012-05-04
20-
Initial release
25+
* Initial release

Splash.ric

-834 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)