Salinity and temperature sensors are implemented in classes.

Dependencies:   mbed

Printer.h

Committer:
mariosimaremare
Date:
2016-06-28
Revision:
15:e112bab9aa2f
Parent:
11:dcaaf1bb21ce

File content as of revision 15:e112bab9aa2f:

/*
* G3: WATERPLAY
*/

#ifndef PRINTER_H
#define PRINTER_H

#include "mbed.h"
#include "TextLCD.h"

class Printer
{
public:
    Printer(
        mbed::Serial &serial,
        TextLCD &lcd
    );
    void toSerial(char* message);
    void toLCD(char* message);
    void toBoth(char* message);
    void toBothln(char* message);
    void display();
    void display(double salinity, char* salinityStatus, double temperature, char* temperatureStatus);
    void display(char* salinityStrStatus, char* temperatureStrStatus);
    void switchStatus();
    void switchAction();

private:
    Serial &_serial;
    TextLCD &_lcd;
    char* _serial_message;
    char* _lcd_message;
    bool _display_status;
    bool _display_action;
};

#endif