Skip to content

Commit

Permalink
define the correct object
Browse files Browse the repository at this point in the history
  • Loading branch information
svengcz committed Dec 21, 2022
1 parent ba517fa commit 45aa206
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bindings/simconnect/dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,12 @@ Napi::Value Dispatcher::nextDispatch(const Napi::CallbackInfo& info) {
if (area->id() == data->dwRequestID) {
std::uint8_t* array = (std::uint8_t*)&data->dwData;

object.Set(Napi::String::New(env, "data"), this->convertSimulatorDataArea(env, receiveData, size, array, area->dataDefinitions()));
Napi::Object dataObject = Napi::Object::New(env);
dataObject.Set(Napi::String::New(env, "definitionId"), Napi::Number::New(env, area->id()));
Napi::Object content = Napi::Object::New(env);
dataObject.Set(Napi::String::New(env, "content"), this->convertSimulatorDataArea(env, receiveData, size, array, area->dataDefinitions()));

object.Set(Napi::String::New(env, "data"), dataObject);
object.Set(Napi::String::New(env, "type"), Napi::String::New(env, "simulatorData"));

found = true;
Expand Down

0 comments on commit 45aa206

Please sign in to comment.