Changes between Version 51 and Version 52 of Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook


Ignore:
Timestamp:
04/04/25 12:36:18 (2 weeks ago)
Author:
Don Wilson
Comment:

--

Legend:

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

    v51 v52  
    2828class CWeighingScreen
    2929{
     30#ARM64
    3031    CFormRect rectWtLbl_[NUM_WT_INDEXES]; // Location for gross, tare, net labels
    3132    CFormRect rectWt_[NUM_WT_INDEXES];
     
    4041    CFormRect rectOperator_;
    4142    CFormRect rectDateTime_;
     43#endif
    4244
    4345public:
     
    4749   }
    4850
     51#if ARM64
     52    void SetupDisplayLocations(void);
     53#endif
     54
    4955};
    50 
    51 
    52 void SetupDisplayLocations(void)
     56{{{
     57
     584. Create a source file wght_screen.cpp in the src folder. Do not just copy this file from a standard project. Copy the SetupDisplayLocations portion of the file from a standard app.
     59
     60
     61{{{#!c++
     62#include "cardinal825.h"
     63#include "appinfo.h"
     64#include "apphelpers.h"
     65#include "langstr.h"
     66
     67void CWeighingScreen::SetupDisplayLocations(void)
    5368{
    5469        int n;
     
    151166}}}
    152167
     1685. Most older app project have almost all of the code in the main cpp file. Most of the functions for displaying dynamic data on the main screen are named Show//XXXX// such as ShowDatetime, ShowGTN, etc...  Cut these functions from the main source file and paste them into the wght_screen.cpp file. Then update the function names to be class members. For example ShowDatetime will be:
     169{{{
     170void CWeighingScreen::ShowDateTime(void)
     171{
     172 
     173}
     174
     175}}}
     176
    1531774. Find the InitLCD function call and change as follows:
    154178