Changes between Version 137 and Version 138 of Docs/825gen2/Dev/UpdatingLegacyApps


Ignore:
Timestamp:
10/03/25 13:23:04 (10 days ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/825gen2/Dev/UpdatingLegacyApps

    v137 v138  
    5858
    595924. The 825 Gen2 defaults to 12 hour time which requires AM/PM labels to show the date/time. Legacy 825 indicators defaulted to 24 hour time. Many legacy apps do not allow for enough space to display the AM/PM labels. So slight modification of the date/time display code may be needed to accommodate 12 hour time.
     60{{{#!c++
     61void ShowDateTime(void)
     62{
     63        SetBkColor(COLOR_ATTENTION);
     64        SetCurColor(nColorBlack);
     65#if ARM64
     66        char dt[32];
     67        GetDateTimeStr(dt, 1);
     68        // Use strlen to allow for 12 hour time am/pm indication
     69        DisplayText(DSP_WIDTH_LEGACY - ((strlen(dt) + 1) * FONT_WIDTH), DATE_Y, dt);
     70#else
     71        DisplayText(DATE_X, DATE_Y, GetDateStr());
     72        DisplayText(TIME_X, TIME_Y, GetTimeStr(1)); // Parameter 1 = Include seconds
     73#endif
     74        SetBkColor(nColorBlack);
     75}
     76}}}
    6077
    617825. Also (probably rare) if the app communicates with another system by serial port, network, or file import/export that interprets the data content as binary integers, floats, etc... it may be necessary to make changes to account for different [https://en.wikipedia.org/wiki/Endianness endianness]. The 825 Gen2 is ARM-64 little-endian, The Legacy 825 is Coldfire big-endian.