Exemple #1
0
void Scope::SetInStateForChannel(unsigned int channel, Pin& p) {
    if ( lastVal[channel]!= p.GetAnalog() ) {
        ostringstream os;
        os << name << " ChangeValue " << SystemClock::Instance().GetCurrentTime() << " " << channel << " " << p.GetAnalog()<<endl;

        ui->Write(os.str());
        //cout << "Set last val for channel " << channel << " value " << p.GetAnalog() << endl;
        lastVal[channel]=p.GetAnalog();
        //cout << "OK" << endl << endl;
    }
}
Exemple #2
0
int HWAdmux::GetMuxOutput() {

    int   pin = admux&(MUX2|MUX1|MUX0);
    Pin*  p = ad[pin];
    if(!p){
	cerr << "HWAdmux::GetMuxOutput null pin on " << pin << endl;
        return 0;
    }
    return p->GetAnalog();
}