OpenSprinkler Forums OpenSprinkler Unified Firmware Program names only 12 characters? Reply To: Program names only 12 characters?

#39921

ShawnHarte
Participant

In the ‘defines’ file station names are set at 16 bytes, the front-end may be restricting them furthur or certain characters could use more than one byte. If you don’t need as many programs you could change the value and compile the firmware yourself. Just note that on the arduino based OS your stored data looks like this:

/** 2KB NVM data structure:
  * |     |              |     |---STRING PARAMETERS---|               |----STATION ATTRIBUTES-----  |          |
  * | UID | PROGRAM_DATA | CON | PWD | LOC | URL | KEY | STATION_NAMES | MAS | IGR | MAS2 | DIS | SEQ | OPTIONS  |
  * | (8) |    (996)     | (8) |(32) |(48) |(64) |(32) | (6*8*16)=768  | (6) | (6) | (6)  | (6) | (6) |  (62)    |
  * |     |              |     |     |     |     |     |               |     |     |      |     |     |          |
  * 0     8            1004  1012   1044  1092  1156  1188            1956  1962  1968   1974 1980   1986       2048
  */

You may have to look at defines on github to see that formatted correctly.

Anyway anything you add in one place will take from another till you reach the 2048 byte limit.

As far as PROGRAM name size it is defined in program.h, you could change the number to something higher there but this would cause you to run into the 996 byte limit for program data with fewer programs. If you don’t need as many programs this is fairly safe to modify slightly. Just be very mindful of how it increases the size in program data. Currently it is 14×12 or 196 bytes, 20 byte names would drop you to 9 programs. So not a lot gained by creating longer names.