Exemple #1
0
void DISPLAY::drawForm(int page) {
    clear();
    switch(page) {
        case -2:
            writeAt(0, 0, "  Homemade GPS  ");
            writeAt(0, 1, "A.Holme May 2013");
            break;
        case -1:
            writeAt(0, 0, "Shutdown");
            break;
        case 0:
            writeAt(0, 0, "PRN __ ___");
            writeAt(0, 1, "____________");
            break;
        case 1:
            writeAt(0, 0, "_     __._____ _");
            writeAt(0, 1, "_     __._____ _");
            break;
        case 2:
            writeAt(0, 0, "__\xDF __\xDF __.___ _");
            writeAt(0, 1, "__\xDF __\xDF __.___ _");
            break;
        case 3:
            break;
    }
}
Exemple #2
0
  // @mfunc Attempt to write the number of bytes given by <p byteCount>
  //        to the current position in this <c OMCachedRawStorage>
  //        from the buffer at address <p bytes>.
  //        The actual number of bytes written is returned in
  //        <p bytesWritten>.
  //        Writing to positions greater than
  //        <mf OMCachedRawStorage::size> causes this
  //        <c OMCachedRawStorage>
  //        to be extended, however such extension can fail, causing
  //        <p bytesWritten> to be less than <p byteCount>.
  //   @parm The buffer from which the bytes are to be written.
  //   @parm The number of bytes to write.
  //   @parm The actual number of bytes written.
void OMCachedRawStorage::write(const OMByte* bytes,
                               OMUInt32 byteCount,
                               OMUInt32& bytesWritten)
{
  TRACE("OMCachedRawStorage::write");

  writeAt(_position, bytes, byteCount, bytesWritten);
}
Exemple #3
0
void DISPLAY::drawData(int page) {
    char s[80];
    switch(page) {
        case 0:
            if (EventCatch(EVT_PRN)) {
                sprintf(s, "%2d %3.0f", StatPRN, StatSNR);
                writeAt(4, 0, s);
            }
            if (EventCatch(EVT_BARS)) {
                setCursor(0, 1);
                for (int i=0; i<NUM_CHANS; i++) write(StatBars[i]);
            }
            break;
        case 1:
            if (EventCatch(EVT_POS)) {
                sprintf(s, "%-5d %8.5f %c", StatChans, StatLat, StatNS);
                writeAt(0, 0, s);
                sprintf(s, "%-5.0f %8.5f %c", StatAlt, StatLon, StatEW);
                writeAt(0, 1, s);
            }
            break;
        case 2:
            if (EventCatch(EVT_POS)) {
                UMS lat(StatLat), lon(StatLon);
                sprintf(s, "%2d\xDF%3d\xDF%7.3f %c", lat.u, lat.m, lat.s, StatNS);
                writeAt(0, 0, s);
                sprintf(s, "%2d\xDF%3d\xDF%7.3f %c", lon.u, lon.m, lon.s, StatEW);
                writeAt(0, 1, s);
            }
            break;
        case 3:
            if (EventCatch(EVT_TIME)) {
                UMS hms(StatSec/60/60);
                sprintf(s, "%s %02d:%02d:%02.0f", Week[StatDay], hms.u, hms.m, hms.s);
                writeAt(0, 0, s);
            }
    }
}