-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating the game-config (sam-config). #5
Comments
Currently it seems that the only two panels that need the habitat volume are the Technically if you don't use these two panels and/or if you create new panels that only use the step data, then we don't even need an initial object. The information that the SAM backend has (whether they are useful for the clients or not) are:
The object could eventually look like: {
habitat: {
inhabitants: 4,
volume: 272
},
sensors: [
{id: "...", model: "adafruit_scd30", update_frequency: "3", location: "greenhouse",
units: {co2: "ppm", humidity: "%", temperature: "C"}},
{id: "...", model: "adafruit_scd30", update_frequency: "3", location: "crew quarters",
units: {co2: "ppm", humidity: "%", temperature: "C"}},
{id: "...", model: "vernier_xxx", update_frequency: "1", location: "crew quarters",
units: {co2: "ppm"}}
]
} We could also create two events to retrieve these value and maybe avoid sending the initial object altogether. |
The latest commit in the capstone-ctrls branch associated with the PR into capstone on simoc-web can demonstrate this pretty easily. The state variables in step.js are all initially set to empty objects, 0's and nulls which are all grouped together in a step_data object. If none of these values are set using the mutators they stay their initial values and are passed to the dashboard. If a value is needed, the dashboard will throw an error and that indicates that that state variable needed to be updated using a mutator. I'm still working on step.js but it'll be even easier to determine the exact agent values that are required once I finish it.
The store step.js is set up so that there is only one place that needs to be updated when the structure of the sensor data sent from the backend is updated i.e. when the key names change. This place is in the function parseData at the end of the file. When the sensor data is passed to this function state variables are updated depending on the data collected. It does this by comparing keys. So if the names of any keys are changed or nested inside of an object, this is the location that needs to be updated. |
This Issue is for determining what needs to be sent from simoc-sam (socketio server) in terms of default values and/or mission configurations to include its structure. Currently sam-config is loaded from a file (src/assets/sam-config.json) on the simoc-web repository. It takes the following form,
Currently, we have decided to keep the sam-config on the frontend. Initially, the simoc simulation would create a game-config from the backend using the configurations provided by the user and send it to the frontend. This step was bypassed since the configuration menu is not available in live mode.
The socketio server on simoc-sam, sends a little json object as follows,
We need to determine the following,
The text was updated successfully, but these errors were encountered: