Button events are not processed by MobiFlight if device names are too long.

Issue #195 resolved
Peter Lang created an issue

Problem summary

Some People report a problem that some devices are not working ( Like LED) in some cases.... If they create it new and upload it again then this devices will work but now some others are stop working.

MF Version

7.4

Steps to reproduce

  • First step
  • Second step

Expected result

Describe how the result should look like in one sentence.

Actual result

Describe how the result actual looks like in one sentence.

Further details

Some People report a problem that some devices are not working ( Like LED) in some cases.... If they create it new and upload it again then this devices will work but now some others are stop working.

Some testings and feedback information result in a problem with length of Device Names. (Looks like there is a overflow somewhere in the Arduino side)

After reworking devicenames much shorter the user reported problems are solved.

Additional "maby" special Signs like _%&$§*# or Spaces are problematic, too.... I not be able to check this until now.

I recommend if possible to find this critical limits.... OR if not possible to choice for a more conservativ policy here.... Maby limmiting Devicename to 6, 8 or 10 letters and suggestion in Manual to not uses Spaces and Symbols if possible.

Comments (10)

  1. Sebastian Möbius

    MF already checks on special characters:

    {
                @":",
                @".",
                @";",
                @",",
                @"#",
                @"/",
                @"|"
    };
    

    and the max length is 32. I will reduce this to 16.

  2. Sebastian Möbius

    I can imagine that the length of a device's name can become an issue because we send the name with every event that the device generates. If you have long names and many events there might be a buffer overflow or so when sending the messages from Arduino to the PC.

  3. pizman82

    UPDATE:

    Please reset this Issue to NOT SOLVED again. Problem is NOT fixed finaly.

    With support of a User i hope to rebuild a full Situation with reproduceable Testing files (*.mfmc) for you. ( Wait for Reply from User till now)

    Just for information:

    Please check this code Part.... Link to mobiflight.ino

    #if MODULETYPE == MTYPE_MEGA
    char type[20]                = "MobiFlight Mega";
    char serial[MEM_LEN_SERIAL]  = "1234567890";
    char name[MEM_LEN_NAME]      = "MobiFlight Mega";
    int eepromSize               = EEPROMSizeMega;
    const int  MEM_LEN_CONFIG    = 1024;
    #endif
    

    Looks like you define the EEPROM Size to 1024 ( whatever its 4096 as i know) Is that correct overall ?

  4. Log in to comment