Skip to content

Commit

Permalink
Merge pull request #34 from RushikeshPatange/fix/correct-variable-type
Browse files Browse the repository at this point in the history
Fix: Resolve Issue With Passing Correct Variable Type Of Baudrate And Offset.
  • Loading branch information
RushikeshPatange committed Nov 30, 2023
2 parents 0e9aab3 + b3cbf6e commit fbb5c0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ async function connectToDevice() {
try {
const loaderOptions = {
transport,
baudrate: baudrates.value,
baudrate: parseInt(baudrates.value),
terminal: espLoaderTerminal
};
esploader = new ESPLoader(loaderOptions);
Expand Down
6 changes: 3 additions & 3 deletions minimal-launchpad/minimal_ui_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function downloadAndFlash() {
let fileArr = []
for (let index = 0; index < imagePartsArray.length; index++) {
let data = await utilities.getImageData(imagePartsArray[index]);
fileArr.push({ data: data, address: imagePartsOffsetArray[index] });
fileArr.push({ data: data, address: parseInt(imagePartsOffsetArray[index]) });
}
try {
const flashOptions = {
Expand Down Expand Up @@ -218,7 +218,7 @@ async function connectToDevice() {
if (config.portConnectionOptions?.length) {
loaderOptions = {
transport: transport,
baudrate: config.portConnectionOptions[0]?.baudRate,
baudrate: parseInt(config.portConnectionOptions[0]?.baudRate),
terminal: espLoaderTerminal,
serialOptions,
};
Expand Down Expand Up @@ -298,7 +298,7 @@ consoleStartButton.onclick = async () => {
}
}
if (config.portConnectionOptions?.length) {
await transport.connect(config.portConnectionOptions[0]?.baudRate, serialOptions);
await transport.connect(parseInt(config.portConnectionOptions[0]?.baudRate), serialOptions);
} else {
await transport.connect();
}
Expand Down

0 comments on commit fbb5c0e

Please sign in to comment.