Ejemplo n.º 1
0
void ProgramData::printProgramData(uint8_t index)
{
    loadProgramData(index);
    if(battery.type != None) {
        Screen::StartInfo::printBatteryString();
        lcdPrintSpace1();
    }

    switch(battery.type) {
    case None:
        lcdPrintUInt(index+1);
        lcdPrintChar(':');
        break;
    case Unknown:
        Screen::StartInfo::printVoltageString(9);
        break;
    case LED:
        lcdPrintCurrent(battery.Ic,5);
        lcdPrintSpace1();
        Screen::StartInfo::printVoltageString(4);
        break;
    default:
        lcdPrintCharge(battery.capacity, 7);
        lcdPrintChar('/');
        lcdPrintUInt(battery.cells);
        break;
    }
}
Ejemplo n.º 2
0
uint8_t ProgramData::printChargeString() const
{
    if(battery.C == PROGRAM_DATA_MAX_CHARGE)
        lcdPrint_P(PSTR("unlimited"));
    else
        lcdPrintCharge(battery.C, 7);
    return 8;
}
Ejemplo n.º 3
0
void Screen::Cycle::displayCycles()
{
    uint8_t c, time = Blink::blinkTime_/8;
    uint8_t all_scr = ProgramDCcycle::currentCycle/2 + 1;
    c = time % all_scr;
    lcdSetCursor0_0();
    lcdPrintUnsigned(c+1, 1);
    lcdPrintChar(SCREEN_EMPTY_CELL_CHAR);
    lcdPrintTime(cyclesHistoryTime[c*2], 6);
    lcdPrintSpace1();
    lcdPrintChar(SCREEN_FULL_CELL_CHAR);
    lcdPrintTime(cyclesHistoryTime[c*2+1], 6);
    lcdPrintSpaces();

    lcdSetCursor0_1();
    lcdPrintCharge(cyclesHistoryCapacity[c*2],8);
    lcdPrintCharge(cyclesHistoryCapacity[c*2+1],8);
    lcdPrintSpaces();
}
Ejemplo n.º 4
0
void Screen::displayScreenCIVlimits()
{
    lcdSetCursor0_0();
    lcdPrintCharge(ProgramData::currentProgramData.getCapacityLimit(), 8);
    lcdPrintChar(' ');
    lcdPrintCurrent(ProgramData::currentProgramData.battery.Ic, 7);
    lcdPrintSpaces();

    lcdSetCursor0_1();
    lcdPrint_P(PSTR("Limits: "));
    lcdPrintVoltage(ProgramData::currentProgramData.getVoltage(ProgramData::VCharge), 7);
    lcdPrintSpaces();
}
Ejemplo n.º 5
0
void Screen::displayStartInfo()
{
    lcdSetCursor0_0();
    ProgramData::currentProgramData.printBatteryString(4);
    lcdPrintChar(' ');
    ProgramData::currentProgramData.printVoltageString();
    lcdPrintChar(' ');
    printProgram2chars(Program::programType_);

    lcdSetCursor0_1();
    uint16_t procent = getChargeProcent();
    if(procent == 100) {
        if(getBlinkOff())
            lcdPrintSpaces(4);
        else
            lcdPrint_P(PSTR("FUL "));
    } else {
        lcdPrintUnsigned(procent, 2);
        lcdPrint_P(PSTR("% "));
    }

    int bindex = getBlinkIndex();
    if(bindex & 1) analogInputs.printRealValue(AnalogInputs::Vout, 5);
    else lcdPrintSpaces(5);

    lcdPrintChar(' ');
    if(ProgramData::currentProgramData.isLiXX()) {
        //display balance port
        if(bindex & 2) analogInputs.printRealValue(AnalogInputs::Vbalancer, 5);
        else lcdPrintSpaces(5);

        if(bindex & 4) lcdPrintDigit(analogInputs.getConnectedBalancePorts());
        else lcdPrintChar(' ');
    } else {

        lcdPrintCharge(ProgramData::currentProgramData.battery.C, 6);
        lcdPrintSpaces();
    }
}
Ejemplo n.º 6
0
void Screen::printCharge() {
    getCharge(charge_);
    lcdPrintCharge(charge_, 8);
    lcdPrintChar(' ');
}