Skip to content

Commit

Permalink
Fixes for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed Apr 30, 2024
1 parent e607a45 commit 4bf7dd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions UI/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@
<h3>Stim Configuration</h3>
</div>
<div class="row">
<div class="col-6 col-4-medium col-12-small">Simulated Pattern: </div>
<div class="col-5 col-4-medium col-12-small">Simulated Pattern: </div>
<div class="col-1 col-6-medium col-12-small tooltip">
<select id="patternSelect" onChange="updatePatternQueue()">
</select>
</div>
</div>
<div class="row">
<div class="col-6 col-4-medium col-12-small">Display Style: </div>
<div class="col-5 col-4-medium col-12-small">Display Style: </div>
<div class="col-1 col-6-medium col-12-small tooltip">
<select id="wheelDisplaySelect" onChange="resetGears()" style="width:300px">
<option value="0">Wheel</option>
Expand Down
14 changes: 11 additions & 3 deletions UI/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ var avrdudeIsRunning = false;

function createWindow () {
// Create the browser window.
windowWidth = 1024;
windowHeight = 700;
if(process.platform == "win32")
{
windowWidth = 1037;
windowHeight = 725;
}

win = new BrowserWindow({
width: 1024,
height: 700,
width: windowWidth,
height: windowHeight,
backgroundColor: '#312450',
webPreferences: {
contextIsolation: false,
Expand Down Expand Up @@ -172,7 +180,7 @@ ipcMain.on('uploadFW', (e, args) => {
avrdudeErr = avrdudeErr + data;

//This is a hack to try and detect old nano bootloader vs new. There does not seem to be a 'nice' way to do this that I can find.
if(data.includes("resp=0x00"))
if(data.includes("resp=0x00") || data.includes("resp=0x01"))
{
avrdudeRetry = true;
child.kill();
Expand Down

0 comments on commit 4bf7dd1

Please sign in to comment.