@libs-scripts-mep/grav-fw-pvi 2.2.1 → 2.3.0

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.
Files changed (2) hide show
  1. package/grav-fw-pvi.js +5 -5
  2. package/package.json +1 -1
package/grav-fw-pvi.js CHANGED
@@ -233,13 +233,13 @@ class GravaFW {
233
233
  * @param {boolean} isBatFile true = firmware esta em .bat / false = firmware esta em .bin
234
234
  * @param {number} betweenMsgTimeout timeout maximo para inatividade na comunicação com o ESP32
235
235
  */
236
- static async ESP32(sessionStorageTag, appPath, isBatFile, betweenMsgTimeout) {
236
+ static async ESP32(sessionStorageTag, AddressFilePath, isBatFile, betweenMsgTimeout) {
237
237
 
238
238
  return new Promise((resolve) => {
239
239
 
240
240
  console.time("WriteFirmware")
241
241
 
242
- if (!appPath) {
242
+ if (!AddressFilePath) {
243
243
  resolve({ sucess: false, msg: "Caminho de arquivo para gravação não especificado" }); return
244
244
  }
245
245
 
@@ -296,11 +296,11 @@ class GravaFW {
296
296
 
297
297
  sessionStorage.getItem(sessionStorageTag) != null ? port = `-p${sessionStorage.getItem(sessionStorageTag)}` : null
298
298
 
299
- const args = `${espToolPath} ${port} -b 480600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x0000 ${appPath}`
299
+ const args = `${espToolPath} ${port} -b 480600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m ${AddressFilePath}`
300
300
 
301
301
  if (isBatFile) {
302
- console.log(`Executando batch: ${appPath} args: ${port}`)
303
- pvi.runInstructionS("EXEC", [appPath, port, "true", "true", "true"])
302
+ console.log(`Executando batch: ${AddressFilePath} args: ${port}`)
303
+ pvi.runInstructionS("EXEC", [AddressFilePath, port, "true", "true", "true"])
304
304
  } else {
305
305
  console.log(`Executando python: ${pythonPath} args: ${args}`)
306
306
  pvi.runInstructionS("EXEC", [pythonPath, args, "true", "true", "true"])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libs-scripts-mep/grav-fw-pvi",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "Auxilia na gravação de microcontroladores por linha de comando através do PVI",
5
5
  "main": "grav-fw-pvi.js",
6
6
  "scripts": {