Changes between Version 3 and Version 4 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/MnBdSetWIM


Ignore:
Timestamp:
02/26/20 09:07:19 (5 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/MnBdSetWIM

    v3 v4  
    2020== Remarks ==
    2121Requires at least main board version 1.20.009 and OS version 1.12.024.
     22
     23Must be used in conjunction with StartRepeatMulti. WIM data will be received in MultiRcv function.
    2224
    2325This function instructs the main board to prepare for buffered weight recording. When the gross weight division value exceeds the on threshold for consecutive on count the buffering begins. Gross weights are recorded into the buffer. When the gross weight drops below the off threshold for consecutive off count the buffering stops. This allows the application to process high speed.
     
    6466
    6567
     68{{{
     69void ProcessMnBdAxleRcvd(struct mnbd_swim_struct* pAxle)
     70{
     71   uint16 maxDivs = pAxle->peakWt;
     72   uint16 numSamples = pAxle->numSamples;
     73   int maxWt = maxDivs * g_cal_param_n[1].interval;
     74   DEBUG_MSG("Axle samples %d peak wt %d start %d end %d diff %d\n",
     75      numSamples, maxWt, pAxle->startTime, pAxle->endTime, pAxle->endTime - pAxle->startTime);
     76
     77   // Process weight interval samples
     78   int n;
     79   for(n = 0; n < numSamples; n++)
     80   {
     81       DEBUG_MSG("%d\n", pAxle->wt[n]);
     82   }
     83}
     84
     85MNBD_EVENT(MultiRcv)
     86{
     87   if(repeat_multi_record == 0x45)
     88   {
     89       if(wimScreenShowing && g_pMnBdCurSWIMAxle != NULL))
     90       {
     91           // Copy pointer to g_pMnBdCurSWIMAxle since it will get updated when next axle is read.
     92           struct mnbd_swim_struct* pAxle = g_pMnBdCurSWIMAxle;
     93           ProcessMnBdAxleRcvd(pAxle);
     94       }
     95
     96   }
     97   else if(repeat_multi_record == 0)
     98   {
     99
     100   }
     101}
     102}}}
     103
    66104== See Also ==
    67105