04.11.2011 - adjust for Windows & QNX, multiprotocol, repeater, signals, process, codec, console input
This commit is contained in:
@@ -197,7 +197,7 @@ void PIProtocol::setSenderAddress(const PIString & ip, int port, bool force) {
|
||||
void PIProtocol::setExpectedFrequency(float frequency) {
|
||||
exp_freq = frequency;
|
||||
if (exp_freq < 10.f / 3.f) pckt_cnt_max = 10;
|
||||
else pckt_cnt_max = round(3.f * exp_freq);
|
||||
else pckt_cnt_max = uint(round(3.f * exp_freq));
|
||||
last_packets.resize(pckt_cnt_max);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ bool PIProtocol::receiveEvent(void * t, char * data, int size) {
|
||||
}
|
||||
|
||||
|
||||
void PIProtocol::diagEvent(void * t) {
|
||||
void PIProtocol::diagEvent(void * t, int) {
|
||||
PIProtocol * p = (PIProtocol * )t;
|
||||
p->calc_freq();
|
||||
p->calc_diag();
|
||||
@@ -283,7 +283,7 @@ void PIProtocol::calc_diag() {
|
||||
|
||||
|
||||
void PIProtocol::calc_freq() {
|
||||
tf = 1000.f / diagTimer->elapsed_m();
|
||||
tf = float(1000.f / diagTimer->elapsed_m());
|
||||
diagTimer->reset();
|
||||
if (cur_pckt != 1) tf = 0.f;
|
||||
immediateFreq = tf;
|
||||
|
||||
Reference in New Issue
Block a user