protocol module: minor clean-up
This commit is contained in:
parent
dd3afd4c4e
commit
511072f206
2 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
// generic.cxx -- generic protocal class
|
// generic.cxx -- generic protocol class
|
||||||
//
|
//
|
||||||
// Written by Curtis Olson, started November 1999.
|
// Written by Curtis Olson, started November 1999.
|
||||||
//
|
//
|
||||||
|
@ -175,6 +175,7 @@ bool FGGeneric::gen_message_binary() {
|
||||||
/* FIXME padding for alignment? Something like:
|
/* FIXME padding for alignment? Something like:
|
||||||
* length += (strlength % 4 > 0 ? sizeof(int32_t) - strlength % 4 : 0;
|
* length += (strlength % 4 > 0 ? sizeof(int32_t) - strlength % 4 : 0;
|
||||||
*/
|
*/
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,6 +330,7 @@ bool FGGeneric::parse_message_binary(int length) {
|
||||||
default: // SG_STRING
|
default: // SG_STRING
|
||||||
SG_LOG( SG_IO, SG_ALERT, "Generic protocol: "
|
SG_LOG( SG_IO, SG_ALERT, "Generic protocol: "
|
||||||
"Ignoring unsupported binary input chunk type.");
|
"Ignoring unsupported binary input chunk type.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,6 +379,7 @@ bool FGGeneric::parse_message_ascii(int length) {
|
||||||
|
|
||||||
default: // SG_STRING
|
default: // SG_STRING
|
||||||
_in_message[i].prop->setStringValue(p1);
|
_in_message[i].prop->setStringValue(p1);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
p1 = p2;
|
p1 = p2;
|
||||||
|
|
|
@ -113,7 +113,7 @@ private:
|
||||||
if( prot.max > prot.min )
|
if( prot.max > prot.min )
|
||||||
{
|
{
|
||||||
if( prot.wrap )
|
if( prot.wrap )
|
||||||
new_val = SGMisc<double>::normalizePeriodic(prot.min, prot.max, new_val);
|
new_val = SGMisc<T>::normalizePeriodic(prot.min, prot.max, new_val);
|
||||||
else
|
else
|
||||||
new_val = SGMisc<T>::clip(new_val, prot.min, prot.max);
|
new_val = SGMisc<T>::clip(new_val, prot.min, prot.max);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue