Selaa lähdekoodia

修复AI也要改为1000倍关系

jevian ma(马作伟_沃航科技) 1 kuukausi sitten
vanhempi
commit
361adf5ca9
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      src/utils/worker.js
  2. 1 1
      src/views/ProjectInfo.vue

+ 1 - 1
src/utils/worker.js

@@ -126,7 +126,7 @@ onmessage = (e) => {
     }
   }
   if (type === 'set') {
-    _SetTrustAI(+i, +val * 100)
+    _SetTrustAI(+i, +val * 1000)
     drawPlc('AI', +i, +val)
   }
   if (type === 'time') {

+ 1 - 1
src/views/ProjectInfo.vue

@@ -1606,7 +1606,7 @@ static PT_THREAD(PROGRAM${index}_body(struct pt *pt, TIME *pt_delay))
               }
               if (cItem.label.includes('AI')) {
                 const idx = cItem.label.slice(2)
-                condition_code += `GET_AI(${idx}) ${operationMap[cItem.operation!]} ${+cItem.value * 100}${linkStr}`
+                condition_code += `GET_AI(${idx}) ${operationMap[cItem.operation!]} ${+cItem.value * 1000}${linkStr}`
               }
               if (cItem.type === 'time') {
                 const timeArr = cItem.value.split(':')