04.11.2011 - adjust for Windows & QNX, multiprotocol, repeater, signals, process, codec, console input

This commit is contained in:
peri4
2011-11-04 15:33:15 +03:00
parent 39ec9cac5c
commit e25553b97b
32 changed files with 468 additions and 294 deletions

View File

@@ -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;