OpenSprinkler Forums OpenSprinkler Unified Firmware Program names only 12 characters?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39914

    atatistcheff
    Participant

    I’m just wondering if I’m doing something wrong or the program names really are limited to just 12 characters. Seems like the field is a lot longer but it only allows me to input 12 bytes. See attached screenshot.

    #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.

    #39923

    DaveC
    Participant

    In the API the Get Program Data request returns the max size of a program name. In 2.1.5, it is 12 characters. As pointed out above, you could potentially change the field size in the FW but you might have to make other modifications for such a change to work all the way out to the browser and mobile apps.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Program names only 12 characters?