mirror of
https://github.com/nasa/trick.git
synced 2024-12-19 21:27:54 +00:00
include freeze time tics in calculation for websocket data intervals (#1296)
This commit is contained in:
parent
ade5932e87
commit
866c21d5a5
@ -16,7 +16,6 @@ class CannonSimObject : public Trick::SimObject {
|
||||
|
||||
public:
|
||||
CANNON cannon ;
|
||||
int foo;
|
||||
CannonSimObject() {
|
||||
("default_data") cannon_default_data( &cannon ) ;
|
||||
("initialization") cannon_init( &cannon ) ;
|
||||
|
@ -41,7 +41,7 @@ VariableServerSession::~VariableServerSession() {
|
||||
(The specified period between messages).
|
||||
*/
|
||||
void VariableServerSession::marshallData() {
|
||||
long long simulation_time_tics = exec_get_time_tics();
|
||||
long long simulation_time_tics = exec_get_time_tics() + exec_get_freeze_time_tics();
|
||||
if ( cyclicSendEnabled && ( simulation_time_tics >= nextTime )) {
|
||||
stageValues();
|
||||
nextTime = (simulation_time_tics - (simulation_time_tics % intervalTimeTics) + intervalTimeTics);
|
||||
@ -170,7 +170,7 @@ void VariableServerSession::addVariable(char* vname){
|
||||
}
|
||||
|
||||
void VariableServerSession::stageValues() {
|
||||
stageTime = (double)exec_get_time_tics() / exec_get_time_tic_value();
|
||||
stageTime = (double)(exec_get_time_tics() + exec_get_freeze_time_tics()) / exec_get_time_tic_value();
|
||||
std::vector<VariableServerVariable*>::iterator it;
|
||||
for (it = sessionVariables.begin(); it != sessionVariables.end(); it++ ) {
|
||||
(*it)->stageValue();
|
||||
|
Loading…
Reference in New Issue
Block a user