Skip to content

Commit

Permalink
Hotfix paramater_parser in sendCfgToGrid!
Browse files Browse the repository at this point in the history
  • Loading branch information
kkerti committed Dec 23, 2020
1 parent b7628db commit 36329f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/app/settings/local/LocalSettings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
runtime.forEach(controller =>{
if(controller.dx == store.brc.DX && controller.dy == store.brc.DY){
let events = controller.banks[store.frame.BANKNUMBER][store.frame.ELEMENTNUMBER].events.find(cntrl => cntrl.event.value == store.frame.EVENTTYPE);
console.log(store.frame.EVENTTYPE)
// Upon connecting modules, messages on config are sent back to editor at instant.
// To avoid unnecessary message flow, filter configs sent back with the cfgstatus flag.
if(events){
Expand Down
8 changes: 4 additions & 4 deletions src/app/stores/runtime.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ function createRuntimeStore(){
"CONFIGURATION",
"FETCH",
[
{ BANKNUMBER: inputStore.bankActive},
{ ELEMENTNUMBER: inputStore.elementNumber},
{ EVENTTYPE: inputStore.eventType},
{ BANKNUMBER: parameter_parser(inputStore.bankActive)},
{ ELEMENTNUMBER: parameter_parser(inputStore.elementNumber)},
{ EVENTTYPE: parameter_parser(inputStore.eventType)},
{ ACTIONSTRING: "" }
],
""
Expand Down Expand Up @@ -133,7 +133,7 @@ export const gridSyncProcess = readable(counter, function start(set){


if(event.cfgStatus == "expected" || event.cfgStatus == "fetched" && gate == 0){

console.log(controller, event.cfgStatus)
getConfig(controller, {bankActive: bankNumber, elementNumber: elementNumber, eventType: event.event.value});
event.cfgStatus = "fetched";

Expand Down

0 comments on commit 36329f4

Please sign in to comment.