Command |
LOAD |
|
|
Description |
Copy Pages and Groups into a previously defined Page or Group.
The background and page attributes for 'Dest' apply to the result so
only entities are copied from previous pages. This allows simple
templates to be merged to form a complex page.
Combine Variables, Buffers and Text and copy the result to a Variable or
Buffer.
This allows absolute text and variables to be joined together and sent
to an interface. |
|
|
Syntax/Parameters |
Load(Dest,Name,Name,...); |
|
|
Options |
Text to Integer/Float
LOAD(MyInt,MyText); //The text string is parsed until a non-valid numeric value.
LOAD(MyInt,"1","2","3"); //MyInt = 123
If the string does not start with a number or +/- then the result is 0.
Example Pointers
To set/change which entity the entity pointer is pointing to you use '>' instead of ','.
LOAD( EntPtr1>"Var1" ); // Set EntPtr1 to point to Var1
LOAD( EntPtr1>"Var1",num,"3" ); // Set EntPtr1 to point to Var123 (very powerful, not found in C)
To put data or an entity name into the entity pointed to by the entity pointer use quotes.
LOAD( EntPtr1, "ABC" ); // Load the Entity pointed to by EntPtr1 with "ABC"
Change Setup Parameters
To change setup parameters use the dot operator. Do not change size and watchdog parameters.
This operator works for: RS2, RS4, AS1, AS2, DBG, I2C, SPI, USB, PWM, ADC, KEYIO, SYSTEM
LOAD( SYSTEM.bled, 50 ); // set backlight to 50% brightness
LOAD( RS2.baud, 9600); // change data rate
LOAD( RS2.baud, baudvar); //use a variable
Change Style Parameters
To change style parameters use the dot operator. Some parameters, such as maximum lengths, are not changeable.
LOAD( stText.col, blue ); // change text colour to blue
LOAD( stImg.curRel, CC );; // change cursor relative position (and update display ';;')
LOAD( stDraw.width, 2 ); // change border width to 2
Write files to NAND
Files can also be transferred from SDHC or serial port to NAND flash
LOAD(NAND,"SDHC/TU480A.mnu"); //use in conjunction with FPROG
LOAD(NAND,"EXT/filename.ext?size=xxx&timedate=yyy&usechecksum=0&useack=1");<CR>zzzzzzzzzzzzzzz
Reads xxx bytes of zzzzzz data from the current serial port and saves the data to the specified file in NAND, setting the file date to yyy
yyy is the file date/time string "YYYY:MM:DD:hh:mm:ss" as used by the RTC.
If usechecksum = 1 the file data must be followed by a 16 bit checksum of the file data (2 bytes, MSB first). The file is only written to NAND if the sent checksum matches the received data checksum.
If useack = 1 a single byte is returned after the file is written to indicate success / failure. 06h (ACK) is returned on success, 15h (NAK) is returned on failure.
Important, the data must follow immediately after the carriage return <CR> (0Dh). Unlike other commands, the optional line feed (0Ah) must not be sent as this will be interpreted as the first byte of data.
The
command that is used to write any file to NAND flash via an interface is
LOAD(NAND, "EXT/filename.ext?size=x&usechecksum=x&useack=x");<cr><file
data>
Description of parameters :-
‘size’ is the file length in bytes.
‘usechecksum’ must be either 1 or 0. If set to 1 then a two byte,
16 bit sum (msb first) of the file data must be sent after the file data.
‘useack’ must be either 1 or 0. If set to 1 then the standard ASCII
ACK or NACK code is sent back to the host to indicate success or
failure of the NAND write.
The file data is sent as raw data and is buffered in RAM and once
the correct number of bytes has been received the file is written to NAND.
When sending more than one file it is best to set ‘useack’ to 1.
The host then waits for ACK before sending the next file.
Example to write a file called 'test.txt' containing the string
'ABC' to NAND :-
LOAD(NAND, "EXT/test.txt?size=3&usechecksum=0&useack=0");<0Dh><41h><42h><43h>
Firmware Updating - v49.00
Support has been added to update the module firmware via a serial port / USB.
> LOAD( NAND, "EXT/xxxxxxxx.tft?size=xxxx&usechecksum=xx" );
> LOAD( NAND, "EXT/nandboot.bin?size=xxxx&usechecksum=xx" );
> LOAD( NAND, "EXT/iuloader.bin?size=xxxx&usechecksum=xx" );
Note: The checksum parameter should be used to help detect problems with data corruption.
Note: It is important that power is not removed during the updates.
Packed Project File (PPF) - v49.08
PPF file can now be loaded via serial port, eg LOAD( NAND, ''EXT/file.ppf?size=xxxx'' );.
UART Enable / Disable - v49.16
Added active=Y/N parameter to RS2/RS4/AS1/AS2/DBG/USB setup. Default is Y for backward compatibility. Allows the associated interface port pins to be disabled by using LOAD(port.active, N);
LOAD from NAND - v49.18
Added support for LOAD( NAND, "NAND/file.ppf" ); which allows a Packed Project File to be loaded and files extracted.
This also allows for LOAD( SDHC, "NAND/file.ext" ); which copies file from NAND to SDHC, though FILE( "COPY"... ) should be used in preference.
LOAD from serial port - v49.18
Files can now be loaded from serial ports using LOAD( NAND, "RS2/file.ext?size=1234" );
This allows file data to be read when not operating from command mode, ie can use RUN( "LOAD( NAND, \\22RS2/file.ext?size=1234\\22 );" ); then receive data on RS232 port.
NAND/NANDMNU/NANDLIB - v49.25
Load source of NAND/NANDMNU/NANDLIB now supported LOAD(SDHC,"NAND/file.ext");
Write files to NANN form VAR - v49.25
LOAD(NAND,"VAR/file.ext?size=xxxx",varBuf); added where the file contents are stored in a text variable.
If the file has the .ppf extension then it is processed and the containing files stored.
Text VAR Source - v49.32
Added ability to use same source text variable as the destination text variable:
LOAD( txtVarA, txtVarB, txtVarA );
Text entities - v49.32
Text entities now supported in LOAD() commands:
LOAD( txtVar, txtEnt, ... ); and LOAD( txtEnt, txtVar, ... ); and LOAD( RS2, txtEnt );
Support for LOAD( BUZZ, ON ); and LOAD( BUZZ, OFF ); - v49.42
* LOAD( BUZZ, ON ); and LOAD( BUZZ, OFF ); (ie ON and OFF without quotes) now
supported. |
|
|
Example |
LOAD(num,2); //load variable num with value 2
LOAD(EditText,EditText,"D"); //Concatonate contents of EditText with D
LOAD(RS2, "DATE=", DTIME, "; TEMP=", ACTVAL, ";\\0D\\0A"); //send concatenated data to RS232
LOAD(NumImg,"Image",num,".bmp"); //Create a name like Image2.bmp
LOAD(BasePage,BaseBack,BaseEnglish); //Create page from template pages
ARRAYS
LOAD( C, Var );
LOAD( C.1, Var );
LOAD( C.1.1, Var );
LOAD( Var1, C );
LOAD( Var1, C.0.1 );
|
|
|
Update Information |
Version |
Title |
Date |
Details |
00.49.60 |
NAND Writing Problem: LOAD(NAND,''SDHC/file.ext''); |
05 Oct 15 |
|
* Fixed potential problem where lock-up can occur whilst reading a file from SDHC and writing to NAND.
|
|
00.13.00 |
EMMC Writing Problem: LOAD(NAND,''SDHC/file.ext''); |
01 Oct 15 |
|
* Fixed problem where lock-up can occur whilst reading a file from SDHC and writing to NAND/EMMC.
|
|
00.01.00 |
Add %f0% to formatting options |
13 Feb 15 |
|
LOAD(RS2,%f0%var);
|
|
49.52 |
Floats to Text Rounding |
27 Feb 14 |
|
Fixed issue where float rounding was unreliable
eg LOAD(RS2,%F2%3.005); returned 3.00. Now returns 3.01
|
|
49.51 |
Screen Capture LOAD( SDHC, PAGE ); |
06 Feb 14 |
|
* Added TFT screen capture to Bitmap file on SD Card. * Use LOAD(SDHC,PAGE); * Files are stored in the "SDHC/page/" directory. If it does not exist then it is created. * Files are stored as "SDHC/page/pagename_num.bmp" where pagename is the name of the page being displayed on the screen and num is an incrementing number. eg if the page "pgTest" is being displayed then the file will be "SDHC/page/pgTest_1.bmp". A second capture would create "SDHC/page/pgTest_2.bmp". * The stored bitmap takes into account the rotation of the screen. * If there is enough free memory then a buffer is created and the display memory is copied instantly to the buffer and this is saved to SD card as a bitmap. This prevents screen updates modifying the required screen capture. If there is not enough free memory then the actual display memory is used and copied to SD card as a bitmap. * Note, due to the large file sizes involved, writing the bitmap to the SD card will take typically 5-7 secs on 3.5", 9-11 secs on 4.3", 23-26 secs 5.7" and 28-32 secs on 7" displays.
|
|
49.50 |
Problem Sending Immediates with Port encode=d16m |
16 Jan 14 |
|
Problem was found when sending immediate integers when a port encoding of d16m was set. This also applied to d16l, d32m and d32l. Extra 0's were being sent.
SETUP( RS2 ) { set="1152NY"; encode=d16m; } LOAD( RS2, \\6C ); // was sending 006C000000000000
This has now been fixed.
encode output d8m 6C d16m 006C d32m 0000006C d8l 6C d16l 6C00 d32l 6C000000
|
|
49.48 |
Display Property Entities - DISPX, DISPY, DISPR |
29 Nov 13 |
|
* Added DISPX, DISPY, and DISPR built-in entities for display properties DISPX - Display Width - 320, 480, 640, 800 and 240, 272, 480 when rotated (S16C data) DISPY - Display Height - 240, 272, 480 and 320, 480, 640, 800 when rotated (S16C data) DISPR - Display Rotation in Degrees - 0, 90, 180, 270 (S16C data) eg LOAD(varDisplayWidth,DISPX);
|
|
49.46 |
Arrays of Pointers Problem |
28 Oct 13 |
|
* Fixed problem loading pointers and values into entity pointer arrays. Only the first entry could be loaded. * Added support for pointer arrays in IF() commands. * Fixed problem loading text vars from entity pointer arrays.
|
|
49.46 |
Text Arrays - Functionality available by using U8 and U16 arrays |
24 Oct 13 |
|
* Text arrays can consist of either ASCII (8-bit) or Unicode (16-bit) characters.
* Creating an array of ASCII (8-bit) characters. Use the U8 data type.
VAR( varA, 0, U8, 6, 10 );
Number of text strings = 6 Maximum text string length = 10
Loading the array, use text formatting '%t%'
LOAD( varA.0, %t% "Zero" ); LOAD( varA.1, %t% "One" ); LOAD( varA.2, %t% "Two" ); LOAD( varA.3, %t% "Three" ); LOAD( varA.4, %t% "Four" ); LOAD( varA.5, %t% "This is too long" ); // truncates to "This is to"
Reading from the array, again using the text formatting '%t%'
LOAD( RS2, %t% varA.0, ", ", %t% varA.4 ); // Outputs "Zero, Four" LOAD( RS2, %t% varA.5 ); // Outputs "This is to" TEXT( txt1, varA.3 );; // Displays "Three"
* Creating an array of Unicode (16-bit) characters. Use the U16 data type
VAR( varB, 0, U16, 4, 8 );
Number of text strings = 4 Maximum text string length = 8
Loading the array, using text formatting '%t%'
LOAD( varB.0, %t% "\\w1234Zero" ); // varB.0.0 = \\1234 LOAD( varB.1, %t% "One" ); LOAD( varB.2, %t% "Two" ); LOAD( varB.3, %t% "Three" );
Reading from the Array, using the text formatting '%t%'
LOAD( RS2, %t% varB.0, ", ", %t% varB.3 ); // Outputs "\\w1234Zero, Three"
* Accessing individual characters using standard array accesses.
LOAD( RS2, %h% varB.0.0 ); // Outputs 1234 LOAD( varB.2.1, 42 ); // '*' LOAD( RS2, varB.2 ); // Outputs "T*o"
* Displaying the raw data using the %r% formatting outputs the whole string including the terminating nulls.
LOAD( RS2, %r% varB.3 ); // Outputs "Three\\00\\00\\00"
|
|
49.46 |
Style switching LOAD(text.style,newstyle); |
21 Oct 13 |
|
* Added functionality to allow the style of an entity to be changed to another. LOAD(entName.style,newStyle);
eg STYLE(stText1,TEXT){ font=Ascii16; col=blue; back=dimgrey; } STYLE(stText2,TEXT){ font=Ascii8; col=green; back=mistyrose; } ... TEXT(txtTest,"This is a test",stText1); ... LOAD(txtTest.style,stText2);;
* Works with STYLES: TEXT, DRAW, IMAGE, PAGE, KEY.
Test Example:
SETUP(RS2){set="1152ND";encode=sr;}
LIB(libImg1,"SDHC/sunflower120x122-4.png");
STYLE(stPage1,PAGE){} STYLE(stPage2,PAGE){ back=pink; } STYLE(stText1,TEXT){ font=Ascii16; col=blue; back=dimgrey; maxLen=128; padding=8; width=4; bcol=aqua; } STYLE(stText2,TEXT){ font=Ascii8; col=green; back=mistyrose; maxLen=128; padding=2; width=1; bcol=red; } STYLE(stDraw1,DRAW){ type=box; col=aqua; back=dimgrey; width=4; maxX=200; maxY=200; } STYLE(stDraw2,DRAW){ type=circle; col=red; back=mistyrose; width=1; maxX=200; maxY=200; } STYLE(stImg1,IMAGE){ curRel=TL; rotate=0; } STYLE(stImg2,IMAGE){ curRel=CC; rotate=180; } STYLE(stTouch1,KEY){type=touch; action=c; repeat=100; evfunc=fnKey1; } STYLE(stTouch2,KEY){type=touch; action=c; repeat=1000; evfunc=fnKey2; }
STYLE(stBtnTxt,TEXT){ font=Ascii16; col=white; } STYLE(stBtnBox,DRAW){ type=box; col=silver; back=grey; width=2; }
VAR(vSw,0,U8);
PAGE(pgMain,stPage1) { POSN(59, 25); DRAW(drwBtn1,100,30,stBtnBox); TEXT(txtBtn1,"Next Style",stBtnTxt); KEY(keyBtn1,[IF(vSw==0?fnSw0:fnSw1);;],100,30,TOUCH);
POSN(109,175); TEXT(txtSam1,"ABCDEFGHIJ",stText1); POSN(109,215); TEXT(txtSam2,"ABCDEFGHIJ",stText2);
POSN(239,55); DRAW(drwShp1,100,80,stDraw1); POSN(239,155); DRAW(drwShp2,100,80,stDraw2);
POSN(369,99); IMG(imgFlw1,libImg1,stImg1); POSN(369,171); IMG(imgFlw2,libImg1,stImg2);
POSN(59,125); DRAW(drwBtn2,100,30,stBtnBox); TEXT(txtBtn2,"Test",stBtnTxt); KEY(keyBtn2,[LOAD(RS2,"D");],[LOAD(RS2,"U");],[LOAD(RS2,"R");],100,30,stTouch1);
} SHOW(pgMain);
FUNC(fnSw0) { LOAD(pgMain.style,stPage2); LOAD(txtSam1.style,stText2); LOAD(txtSam2.style,stText1); LOAD(drwShp1.style,stDraw2); LOAD(drwShp2.style,stDraw1); LOAD(imgFlw1.style,stImg2); LOAD(imgFlw2.style,stImg1); LOAD(keyBtn2.style,stTouch2); LOAD(vSw,1); }
FUNC(fnSw1) { LOAD(pgMain.style,stPage1); LOAD(txtSam1.style,stText1); LOAD(txtSam2.style,stText2); LOAD(drwShp1.style,stDraw1); LOAD(drwShp2.style,stDraw2); LOAD(imgFlw1.style,stImg1); LOAD(imgFlw2.style,stImg2); LOAD(keyBtn2.style,stTouch1); LOAD(vSw,0); }
FUNC(fnKey1) { LOAD(RS2,"1"); }
FUNC(fnKey2) { LOAD(RS2,"2"); }
VAR(vCal,0,U8); LOAD(vCal,TCH_CAL); IF( vCal==0?[LOAD(SYSTEM.calibrate,y);]);
|
|
49.42 |
Structures - STRUCT(){} |
06 Sep 13 |
|
* Structures are now supported in the firmware. * To define a structure type (does not create actual structure yet):
STRUCT( strName ) { var1, type1; var2, type2; .... }
where strName is the name for the structure var1, var2 ... are the names for the variables in the structure type1, type2 ... are the data types for the variables in the structure
Example:
STRUCT( strPerson ) { name, TXT; age, U8; height, U16; weight, FLT4; }
* To create a structure variable
VAR( name, 0, strName );
where name is the name for your structure variable 0 is the intial value (not used) strName is the name of the structure definition
Example:
VAR( Per, 0, strPerson ); // Create a structure for one person LOAD( Per.name, "Itron" ); LOAD( Per.age, 100 ); LOAD( RS2, Per.name ); // will output "Itron"
* To create an array of structures
VAR( name, 0, strName, n, n, n );
where n is the number of subscripts
Example:
VAR( Co, 0, strPerson, 2, 5 ); // Create a structure for a company LOAD( Co.0.0.name, "Mike" ); // First index used for department LOAD( Co.0.0.age, 102 ); LOAD( Co.0.0.height, 100 ); LOAD( Co.0.0.weight, 8.4 ); LOAD( Co.0.1.name, "Andy" ); ... LOAD( Co.0.2.name, "Dave" ); ... LOAD( Co.1.0.name, "Bob" ); // Next department LOAD( Co.1.0.age, 23 ); LOAD( Co.1.0.height, 180 ); LOAD( Co.1.0.weight, 12.4 ); LOAD( Co.1.1.name, "Mark" ); ...
LOAD( RS2, Co.1.0.name, " aged ", Co.1.0.age, " is ", Co.1.0.height, "cm tall" ); // will output "Bob aged 23 is 180cm tall" CALC( Co.0.2.age, Co.1.0.age, Co.0.0.age, "+" ); // will give Dave an age of 125
* How it works - multiple entities are created.
STRUCT( myStruc ) { aa,U8; bb,U16; cc,TXT; }
will effectively create 3 variables when STRUCT is defined: VAR( aa, 0, U32C ); VAR( bb, 1, U32C ); VAR( cc, 2, U32C );
VAR( xx, 0, myStruc );
will effectively create (3+1) = 4 variables and set up the pointers: VAR( xx > "", PTR, 3 ); VAR( xx_aa, 0, U8 ); LOAD( xx.0 > "xx_aa" ); VAR( xx_bb, 0, U16 ); LOAD( xx.1 > "xx_bb" ); VAR( xx_cc, "", TXT ); LOAD( xx.2 > "xx_cc" );
VAR( st, 0, myStruc, 3, 2 );
will effectively create (3*2*3+1) = 19 variables and set up the pointers: VAR( st > "", PTR, 3, 2, 3 ); VAR( st_0_0_aa, 0, U8 ); LOAD( st.0.0.0 > "st_0_0_aa" ); VAR( st_0_0_bb, 0, U16 ); LOAD( st.0.0.1 > "st_0_0_bb" ); VAR( st_0_0_cc, "", TXT ); LOAD( st.0.0.2 > "st_0_0_cc" ); VAR( st_0_1_aa, 0, U8 ); LOAD( st.0.1.0 > "st_0_1_aa" ); VAR( st_0_1_bb, 0, U16 ); LOAD( st.0.1.1 > "st_0_1_bb" ); VAR( st_0_1_cc, "", TXT ); LOAD( st.0.1.2 > "st_0_1_cc" ); VAR( st_1_0_aa, 0, U8 ); LOAD( st.1.0.0 > "st_1_0_aa" ); VAR( st_1_0_bb, 0, U16 ); LOAD( st.1.0.1 > "st_1_0_bb" ); VAR( st_1_0_cc, "", TXT ); LOAD( st.1.0.2 > "st_1_0_cc" ); VAR( st_1_1_aa, 0, U8 ); LOAD( st.1.1.0 > "st_1_1_aa" ); VAR( st_1_1_bb, 0, U16 ); LOAD( st.1.1.1 > "st_1_1_bb" ); VAR( st_1_1_cc, "", TXT ); LOAD( st.1.1.2 > "st_1_1_cc" ); VAR( st_2_0_aa, 0, U8 ); LOAD( st.2.0.0 > "st_2_0_aa" ); VAR( st_2_0_bb, 0, U16 ); LOAD( st.2.0.1 > "st_2_0_bb" ); VAR( st_2_0_cc, "", TXT ); LOAD( st.2.0.2 > "st_2_0_cc" ); VAR( st_2_1_aa, 0, U8 ); LOAD( st.2.1.0 > "st_2_1_aa" ); VAR( st_2_1_bb, 0, U16 ); LOAD( st.2.1.1 > "st_2_1_bb" ); VAR( st_2_1_cc, "", TXT ); LOAD( st.2.1.2 > "st_2_1_cc" );
* Limitations: The concatenation of structure var name with underscores and indices must fit within an entity name length. Therefore structure var names should be kept short. The user must be careful not to create entities with the same name as the vars in the STRUCT - an error message will occur.
|
|
49.42 |
Support for LOAD( BUZZ, ON ); and LOAD( BUZZ, OFF ); |
06 Sep 13 |
|
* LOAD( BUZZ, ON ); and LOAD( BUZZ, OFF ); (ie ON and OFF without quotes) now supported.
|
|
49.42 |
IMG() Source Filename in a Text Var |
06 Sep 13 |
|
* IMG now supports source image filename in a text var. eg LOAD( varFilePath, "SDHC/dir1/", varFileName ); IMG( imN, varFilePath, stImg );
|
|
49.42 |
Dot Operator with Pointers Bug |
06 Sep 13 |
|
* Added functionality to access array of pointers when no space present between the array subscript and the '>'. LOAD( arr.0>"abc" );
|
|
49.42 |
Pointer Arrays as LOAD() Source |
06 Sep 13 |
|
* Added functionality to allow a LOAD() source to be from a pointer array. LOAD(RS2,A.0.0); where A is array of pointers.
|
|
49.37 |
Load NAND from Buffer/File with Filename in Text Variable |
10 Jun 13 |
|
* Added LOAD(NAND,varFileName); and LOAD(NAND,varFileName,buf); so that path can be stored in a variable rather than immediate string.
|
|
49.37 |
Large Buffer Variables (> 8192) |
10 Jun 13 |
|
* Special case for buffers required > 8192 bytes, use bufLen rather than maxLen/length.
|
|
49.37 |
Convert to Unicode - %w% and Convert to UTF-8 - %m% |
10 Jun 13 |
|
Convert to Unicode ------------------ * Added %w% formatting character to convert characters to Unicode Characters * For Sending on Serial Port (set with encode=sr;): LOAD( varTxDataTxt, "\\w0033\\w0034\\w0144", %w%45 ); LOAD( AS2, %w%varTxDataTxt, "\\00\\03" ); // Will send 00 33 00 34 01 44 00 45 00 03 * For receiving on serial Port (set with encode=sr;): LOAD( varRxDataTxt, AS2 ); TEXT( txtMsg1, %w%varRxDataTxt );; * For converting text // varRxData = 0000 0033 0000 0034 0001 0044 0000 0045 LOAD( varRxDataTxt, %w%varRxDataTxt ); // varRxData = 0033 0034 0144 0045 * Added additional functionality to convert characters from an U8/S8 array LOAD(txtRxData,"\\22",%w%varRxArr,"\\22"); // 5. From Array formatted into text with LOAD()
Convert to UTF-8 ---------------- * Added %m% formatting character to convert characters to UTF-8 Characters * Works with sources of serial ports, text, text variables and U8/S8 arrays TEXT(txtRxData,%m%AS2); // 1. Directly from port formatted into TEXT() TEXT(txtRxData,%m%varRxData); // 2. From text var formatted into TEXT() LOAD(varRxData,%m%AS2); // 3. From port formatted into text var LOAD(txtRxData,"\\22",%m%varRxData,"\\22");; // 4. From text var formatted into text with LOAD() LOAD(txtRxData,"\\22",%m%varRxArr,"\\22"); // 5. From Array formatted into text with LOAD() LOAD(varA,%m%varRxData); // 6. From text var to text var
|
|
49.32 |
LOAD() - Added ability to use same source text variable as the destination text variable. |
14 Feb 13 |
|
* Added ability to use same source text variable as the destination text variable: LOAD( txtVarA, txtVarB, txtVarA ); * Corrected copying of text to allow value of 0 to be ignored and not treated as terminating NUL. * Changed default precision from 0 to 2 for writing immediate floats into a text variable to match default of float variable. * Text entities now supported in LOAD() commands: LOAD( txtVar, txtEnt, ... ); and LOAD( txtEnt, txtVar, ... ); and LOAD( RS2, txtEnt );
|
|
49.25 |
Saving file from buffer/NAND |
01 Nov 12 |
|
* LOAD(NAND,"VAR/file.ext?size=xxxx",varBuf); added where the file contents are stored in a text variable. * If the file has the .ppf extension then it is processed and the containing files stored. * Load source of NAND/NANDMNU/NANDLIB now supported LOAD(SDHC,"NAND/file.ext"); etc
|
|
49.18 |
LOAD from serial port - Files can now be loaded from serial ports using LOAD( NAND, ''RS2/file.ext?size=1234'' );. |
22 Sep 12 |
|
Files can now be loaded from serial ports using LOAD( NAND, "RS2/file.ext?size=1234" ); This allows file data to be read when not operating from command mode, ie can use RUN( "LOAD( NAND, \\22RS2/file.ext?size=1234\\22 );" ); then receive data on RS232 port.
|
|
49.18 |
LOAD from NAND - Added LOAD( NAND, ''NAND/file.ppf'' ); which allows a Packed Project File to be loaded and files extracted. |
22 Sep 12 |
|
Added support for LOAD( NAND, "NAND/file.ppf" ); which allows a Packed Project File to be loaded and files extracted. * This also allows for LOAD( SDHC, "NAND/file.ext" ); which copies file from NAND to SDHC, though FILE( "COPY"... ) should be used in preference.
|
|
49.16 |
UART Enable / Disable - Added active=Y/N parameter to RS2/RS4/AS1/AS2/DBG/USB setup. |
14 Sep 12 |
|
Added active=Y/N parameter to RS2/RS4/AS1/AS2/DBG/USB setup. Default is Y for backward compatibility. Allows the associated interface port pins to be disabled by using LOAD(port.active, N);
|
|
49.14 |
KEYIO - Fixed KEYIO problem affecting LOAD(keyio.param, value);. |
27 Jul 12 |
|
* Fixed KEYIO problem affecting LOAD(keyio.param, value);
|
|
49.08 |
Packed Project File (PPF) - PPF file can now be loaded via serial port, eg LOAD( NAND, ''EXT/file.ppf?size=xxxx'' );. |
11 Jul 12 |
|
PPF file can now be loaded via serial port, eg LOAD( NAND, "EXT/file.ppf?size=xxxx" );
|
|
49.06 |
Serial Comms Terminating Chars - Fixed LOAD( var, PORT ); when more than one terminating character in ''proc'' is specified. |
29 Jun 12 |
|
Fixed LOAD( var, PORT ); when more than one terminating character in "proc" is specified. - Affects RS2, RS4, AS1, AS2, DBG, SPI, I2C, USB * Fixed problem loading text buffers keeping the terminating characters (too many characters appended). * Fixed problem loading arrays keeping terminating characters when required. * Fixed problem with USB ignoring "proc" setting (was interrupting on all data)
|
|
49.03 |
LOAD( ''SDHC/filename.txt'', var, var, ... ) - Fixed. The file now appends rather than truncating each time. |
01 Jun 12 |
|
Fixed. The file now appends rather than truncating each time. * File write speeds improved.
|
|
49.03 |
NAND / NANDLIB / NANDMNU - All three sources/destination now globally accepted in LOAD/CALC etc commands. |
01 Jun 12 |
|
All three sources/destination now globally accepted in LOAD/CALC etc commands (previously just NAND accepted).
|
|
49.00 |
Opacity - Added opacity to images, drawing objects and text. |
22 Mar 12 |
|
Added opacity to images, drawing objects and text STYLE( st, image | draw | text ) { ...... opacity = n; // n = 0..100 where 0=transparent..100=opaque (default=100) ....... }
LOAD( st.opacity, num ); // Dot operator also supported. Restrictions: Not supported for library images with bits=16.
|
|
49.00 |
NAND |
22 Mar 12 |
|
LOAD( NAND, "file" ); loads "file" into MNU area of NAND if it is a mnu file else into LIB area of NAND for other files LOAD( NANDLIB, "file" ); loads the "file" into LIB area of NAND LOAD( NANDMNU, "file" ); loads the "file" into MNU area of NAND RESET( NAND ); clears both MNU and LIB areas of NAND RESET( NANDLIB ); clears just the LIB area of NAND RESET( NANDMNU ); clears just the MNU area of NAND LIB(imgnam1,"NAND/filename.bmp...."); Only use the name NAND to read files Note, when reading a file from NAND, both areas of NAND are looked at automatically. Care should be taken not to put the same named file into both areas. The LIB area is read first.
Fixed bug which in many circumstances results in being unable to find the file in the directory, and writing 4kbyte of directory entries to a random sequence of sectors on the card. Fixed bug when reading files from NAND - file stack required is multiple of 2KB page size.
|
|
49.00 |
Firmware Updating |
22 Mar 12 |
|
Support has been added to update the module firmware via a serial port / USB. > LOAD( NAND, "EXT/xxxxxxxx.tft?size=xxxx&usechecksum=xx" ); > LOAD( NAND, "EXT/nandboot.bin?size=xxxx&usechecksum=xx" ); > LOAD( NAND, "EXT/iuloader.bin?size=xxxx&usechecksum=xx" ); Note: The checksum parameter should be used to help detect problems with data corruption. Note: It is important that power is not removed during the updates.
|
|
49.00 |
Exponents - Parser now supports numbers in exponent format. |
22 Mar 12 |
|
Parser now supports numbers in exponent format, eg 1.2e-7 or 3.142E5. For example, LOAD(fltVar,45.67e-5);
|
|
47.24 |
Checksums - CALC( dst, src, ''type'', ''MCHK'' ); CALC( res, src, ''type'', ''TCHK'' ); |
31 Oct 11 |
|
CALC( dst, src, "type", "MCHK" ); // Copy src buf to dst buf, make checksum of "type" and append to dst buf * CALC( res, src, "type", "TCHK" ); // Test checksum of "type" in src buf and set res to 1 if checksums same, else 0.
where "type" is: "SUM8ZA" - Sum all data in src as type U8, checksum is two's complement of the sum, stored as two ASCII hexadecimal characters (when sum added to checksum is zero, res is 1) "SUM8ZD" - Sum all data in src as type U8, checksum is two's complement of sum, stored as single U8 (when sum added to checksum is zero, res is 1) "SUM8A" - Sum all data in src as type U8, checksum is sum, stored as two ASCII hexadecimal characters (when sum is same as checksum, res is 1) "SUM8D" - Sum all data in src as type U8, checksum is sum, stored as single U8 (when sum is same as checksum, res is 1) "XOR8A" - Exclusive-OR (XOR) of all data in src as type U8, checksum is XOR, stored as two ASCII hexadecimal characters (when XOR of src with checksum is zero, res is 1) "XOR8D" - Exclusive-OR (XOR) of all data in src as type U8, checksum is XOR, stored as single U8 (when XOR of src with checksum is zero, res is 1)
* Example: LOAD(txData,"1234"); FUNC(SendData) { CALC(txData,txData,"SUM8ZA","MCHK"); // Add checksum (txData="123436") LOAD(RS2,txData); // Send data }
FUNC(ReceiveData) { LOAD(rxData,RS2); // Read data CALC(res,rxData,"SUM8ZA","TCHK"); // Check for checksum error IF(res=1?ProcessData:DataError); }
|
|
44.00 |
NAND and SDHC - Module can now run entirely from NAND. |
20 May 11 |
|
Latest functionality added. Module can now run entirely from NAND. · LOAD(NAND,"SDHC/filename.ext"); to copy files to NAND; · LIB(name,"NAND/filename.ext"); and INC("NAND/filename.ext"); to use from NAND. RESET(NAND); added. SD Card is no longer required to be present at boot.
|
|
39.00 |
Added Dot Operator - Setups can now be modified during run-time using the LOAD() command by using a dot operator. |
21 Jan 11 |
|
Setups can now be modified during run-time using the LOAD() command by using a dot operator. Use LOAD(interface.param,val); eg. LOAD(system.bled,50); // Set backlight to 50% LOAD(rs2.baud,9600); // Change the RS232 baud to 9600 This operator works for: RS2, RS4, AS1, AS2, DBG, I2C, SPI, PWM, ADC, KEYIO, SYSTEM Note that some setups are fixed at start up during the SETUP() command and cannot be subsequently modified (eg watchdog timer). This capability will be applied to VARs and STYLEs in the next release.
|
|
39.00 |
Outputting of 0 on Ports - LOAD( RS2, 0 ); now outputs a 0. |
21 Jan 11 |
|
LOAD( RS2, 0 ); now outputs a 0.
|
|
37.00 |
Page Merging - LOAD(Page1,Page2,Page3,…);. |
13 Dec 10 |
|
LOAD(Page1,Page2,Page3,…); will copy all entities from Page2 into Page1, then Page3 into Page 1, then Page4 into Page 1
|
|
36.00 |
Text into Nums - Text strings are now converted into Nums/Floats during LOAD(INT,TEXT); . |
23 Nov 10 |
|
Text strings are now converted into Nums/Floats during LOAD(INT,TEXT); The text string is parsed until a non-valid numeric value. If the string does not start with a number or +/- then the result is 0.
|
|
35.00 |
RTC - RTC can now be set by a text strings and VARs using concatenation. |
12 Nov 10 |
|
RTC can now be set by a text strings and VARs using concatenation. Examples: LOAD(RTC,"2010:12:11:10:19:26"); or VAR(years,2010,U16); VAR(months,11,U8); VAR(days,2,U8); VAR(time,"00:00",TXT); LOAD(RTC,years,":",months,":",days,":",hours,":",time,":00"); (This will give "2010:11:02:00:00:00") You must supply the complete string…ie you cannot just load years.
|
|
34.00 |
EEPROM Storage - The user software can store values (text and numbers) in EEPROM. |
19 Oct 10 |
|
The user software can store values (text and numbers) in EEPROM About 1500 bytes are available. This would hold about 50 variable names and their values. Example command VAR(MyEENum, 123, U8E); stores 123 in MyEENum the first time as a default. When you use LOAD(MyEENum, 244); the value is updated in RAM and in EEPROM. When power is removed and reapplied, VAR(MyEENum, 123, U8E); will not load 123 but the previously saved value. To clean up the EEPROM during development, use RESET(EEPROM); which cleans the EEPROM and loads back only the currently defined variables.
STYLE( EEstyle, data) { type=U8; location=eeprom; } if location is specified as eeprom, data is stored otherwise just RAM is used and data lost at power off.
Built in data types have been created to simplify EEPROM storage: U8E, S8E, U16E, S16E, U32E, S32E, PTRE, FLT1E, FLT2E, FLT3E, FLT4E, TXTE
The ‘aircon.mnu’ now uses two U8E variables for the minimum and maximum temperatures. Error messages will be generated if a variable stored in EEPROM is redefined in SDRAM or a different VAR type is specified.
|
|
27.00 |
Entity Pointers - Entity pointers have been added. |
10 Sep 10 |
|
Entity pointers have been added. STYLE( PtrData, DATA ) { type = pointer; } VAR( EntPtr1, PtrData );
To set/change which entity the entity pointer is pointing to you enclose its name in quotes. LOAD( "EntPtr1", "Var1" ); // Set EntPtr1 to point to "Var1"
To access the entity pointed to by the entity pointer, do not enclose is quotes. LOAD( EntPtr1, "ABC" ); // Load the Entity pointed to by EntPtr1 with "ABC"
The following commands now support entity pointers: > LOAD(name|ptr|"ptr",num|"txt"|var|ptr,...); > CALC(var|ptr,var|ptr,num|var|ptr,"op"); > TEXT(name|ptr,"txt"|var|ptr,...); > IF(var|ptr op num|"txt"|var|ptr ? func|func_ptr : func|func_ptr); > KEY(name,func|func_ptr,...); > INT(name,buf,func|func_ptr,...); > SHOW(name|ptr,...); > HIDE(name|ptr,...); > RUN(name|func_ptr,...); > IMG(name|img_ptr,lib|img_ptr,...);
See the tu480.mnu file for an example of using pointers to update images representing CNTSECS.
|
|
24.00 |
Touch Screen - Controlled by Interrupt and 3 sample averaging. |
25 Aug 10 |
|
Controlled by Interrupt and 3 sample averaging * The touch screen is now interrupt driven with improved accuracy, sample averaging and discarding of spurious samples. * Added LOAD( Name, TOUCHX ); and LOAD( Name, TOUCHY ); to output last Touch Screen coordinates. The WAIT() command is no longer needed with touch screen. Repeat on touch screen to be in next release.
|
|
24.00 |
System Setup - Watchdog and LED backlight. |
25 Aug 10 |
|
Watchdog and LED backlight * Watchdog is now enabled at startup with boot.bin v00.03 * Use LOAD( BLED, 100 ); to change backlight level
|
|
23.00 |
LOAD - String concatenation now possible into a text variable: |
17 Aug 10 |
|
String concatenation now possible into a text variable: eg LOAD(TextVar1,Var2,Str3,Num4,Flt5, ...);
|
|
20.00 |
LOAD - LOAD( RS2, var,var1,var2,var3...varn ); or LOAD( I2C, var,var1,var2,var3...varn );. |
22 Jul 10 |
|
LOAD( RS2, var,var1,var2,var3...varn ); where var is a VAR or NUM or TEXT LOAD( I2C, var,var1,var2,var3...varn ); where var is a VAR or NUM or TEXT
|
|
|
|