void plotly::plot(unsigned long x, int y, char *token){
    reconnectStream();
    jsonStart(len_(x)+len_(y));
    print_(x);
    jsonMiddle();
    print_(y);
    jsonEnd(token);
}
Esempio n. 2
0
OutputIceCast::OutputIceCast()
: _shout(0),
  _state(INVALID),
  _timer(new QTimer(this))
{
    _timer->setInterval(5000);
    _timer->setSingleShot(false);
    connect(_timer, SIGNAL(timeout()), this, SLOT(connectStream()));
    connect(this, SIGNAL(requestReconnect()), this, SLOT(reconnectStream()), Qt::QueuedConnection);
    shout_init();
}
void plotly::plot(unsigned long x, float y, char *token){
    reconnectStream();

    char s_[15];
    my_dtostrf(y,2,3,s_);

    jsonStart(len_(x)+len_(s_)-1);
    print_(x);
    jsonMiddle();
    print_(y);
    jsonEnd(token);
}