@libs-scripts-mep/grav-fw-pvi 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/grav-fw-pvi.js +9 -3
- package/package.json +1 -1
package/grav-fw-pvi.js
CHANGED
|
@@ -10,6 +10,12 @@ class GravaFW {
|
|
|
10
10
|
|
|
11
11
|
return new Promise(async (resolve) => {
|
|
12
12
|
|
|
13
|
+
let validationMsg = ``
|
|
14
|
+
|
|
15
|
+
if (dirFirm != null && dirOpt != null) { validationMsg = `Verify OPTION BYTE succeeds` }
|
|
16
|
+
else if (dirFirm != null) { validationMsg = `Verifying PROGRAM MEMORY succeeds` }
|
|
17
|
+
else if (dirOpt != null) { validationMsg = `Verify OPTION BYTE succeeds` }
|
|
18
|
+
|
|
13
19
|
let ObjWriteSTM8 = await defineWriteSTM8(dirFirm, dirOpt, objArguments)
|
|
14
20
|
|
|
15
21
|
let logGravacao = ""
|
|
@@ -23,7 +29,7 @@ class GravaFW {
|
|
|
23
29
|
|
|
24
30
|
if (param[0] != undefined) {
|
|
25
31
|
|
|
26
|
-
if (param[0].includes(
|
|
32
|
+
if (param[0].includes(validationMsg)) {
|
|
27
33
|
|
|
28
34
|
PVI.FWLink.globalDaqMessagesObservers.remove(id)
|
|
29
35
|
clearTimeout(timeOutGravacao)
|
|
@@ -42,7 +48,7 @@ class GravaFW {
|
|
|
42
48
|
PVI.FWLink.globalDaqMessagesObservers.remove(id)
|
|
43
49
|
clearTimeout(timeOutGravacao)
|
|
44
50
|
|
|
45
|
-
resolve({ sucess: null, msg: `Não foi possível
|
|
51
|
+
resolve({ sucess: null, msg: `Não foi possível realizar a gravação` })
|
|
46
52
|
|
|
47
53
|
}
|
|
48
54
|
|
|
@@ -99,7 +105,7 @@ class GravaFW {
|
|
|
99
105
|
const Device = objArguments.Device != undefined ? `-Device=${objArguments.Device}` : ""
|
|
100
106
|
const NbTools = objArguments.NbTools != undefined ? `-NbTools=${objArguments.NbTools} ` : "-NbTools=1 "
|
|
101
107
|
const Tool_ID = objArguments.Tool_ID != undefined ? `-Tool_ID=${objArguments.Tool_ID} ` : "-Tool_ID=0 "
|
|
102
|
-
const BoardName = objArguments.BoardName != undefined ? `-BoardName=${objArguments.BoardName} ` : "-BoardName=ST-LINK "
|
|
108
|
+
const BoardName = objArguments.BoardName != undefined ? `-BoardName=${objArguments.BoardName} ` : "-BoardName=ST-LINK "
|
|
103
109
|
|
|
104
110
|
const FileData = objArguments.FileData != undefined ? `-FileOption=${objArguments.FileData} ` : ""
|
|
105
111
|
const FileProg = dirFirm != null ? `-FileProg=${dirFirm.replace(/[\\]/g, `\/`).replace(/\.stp|\.STP/, `.HEX`)} ` : ""
|