Skip to content

Commit 4c5fe4f

Browse files
committed
Fix camel case
1 parent f542eb7 commit 4c5fe4f

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

preload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ const Serial = {
2424
execFile: async (path) => {
2525
return board.execfile(path)
2626
},
27-
get_prompt: async () => {
27+
getPrompt: async () => {
2828
return board.get_prompt()
2929
},
30-
keyboard_interrupt: async () => {
30+
keyboardInterrupt: async () => {
3131
await board.stop()
3232
return Promise.resolve()
3333
},

ui/arduino/store.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ async function store(state, emitter) {
115115

116116
// Stop whatever is going on
117117
// Recover from getting stuck in raw repl
118-
await serial.get_prompt()
118+
await serial.getPrompt()
119119

120120
// Make sure there is a lib folder
121121
log('creating lib folder')
@@ -174,7 +174,7 @@ async function store(state, emitter) {
174174
emitter.emit('open-panel')
175175
emitter.emit('render')
176176
try {
177-
await serial.get_prompt()
177+
await serial.getPrompt()
178178
await serial.run(code)
179179
} catch(e) {
180180
log('error', e)
@@ -187,7 +187,7 @@ async function store(state, emitter) {
187187
}
188188
emitter.emit('open-panel')
189189
emitter.emit('render')
190-
await serial.get_prompt()
190+
await serial.getPrompt()
191191
})
192192
emitter.on('reset', async () => {
193193
log('reset')
@@ -272,7 +272,7 @@ async function store(state, emitter) {
272272
// Check if the current full path exists
273273
let fullPathExists = false
274274
if (openFile.source == 'board') {
275-
await serial.get_prompt()
275+
await serial.getPrompt()
276276
fullPathExists = await serial.fileExists(
277277
serial.getFullPath(
278278
state.boardNavigationRoot,
@@ -295,7 +295,7 @@ async function store(state, emitter) {
295295
if (openFile.source == 'board') {
296296
openFile.parentFolder = state.boardNavigationPath
297297
// Check for overwrite
298-
await serial.get_prompt()
298+
await serial.getPrompt()
299299
willOverwrite = await serial.fileExists(
300300
serial.getFullPath(
301301
state.boardNavigationRoot,
@@ -330,7 +330,7 @@ async function store(state, emitter) {
330330
const contents = openFile.editor.editor.state.doc.toString()
331331
try {
332332
if (openFile.source == 'board') {
333-
await serial.get_prompt()
333+
await serial.getPrompt()
334334
await serial.saveFileContent(
335335
serial.getFullPath(
336336
state.boardNavigationRoot,
@@ -920,7 +920,7 @@ async function store(state, emitter) {
920920
const contents = openFile.editor.editor.state.doc.toString()
921921
try {
922922
if (openFile.source == 'board') {
923-
await serial.get_prompt()
923+
await serial.getPrompt()
924924
await serial.saveFileContent(
925925
serial.getFullPath(
926926
state.boardNavigationRoot,
@@ -983,7 +983,7 @@ async function store(state, emitter) {
983983
const contents = openFile.editor.editor.state.doc.toString()
984984
try {
985985
if (openFile.source == 'board') {
986-
await serial.get_prompt()
986+
await serial.getPrompt()
987987
await serial.saveFileContent(
988988
serial.getFullPath(
989989
state.boardNavigationRoot,
@@ -1384,7 +1384,7 @@ async function getAvailablePorts() {
13841384
}
13851385

13861386
async function getBoardFiles(path) {
1387-
await serial.get_prompt()
1387+
await serial.getPrompt()
13881388
let files = await serial.ilistFiles(path)
13891389
files = files.map(f => ({
13901390
fileName: f[0],
@@ -1403,6 +1403,7 @@ function checkDiskFile({ root, parentFolder, fileName }) {
14031403

14041404
async function checkBoardFile({ root, parentFolder, fileName }) {
14051405
if (root == null || parentFolder == null || fileName == null) return false
1406+
await serial.getPrompt()
14061407
return serial.fileExists(
14071408
serial.getFullPath(root, parentFolder, fileName)
14081409
)

0 commit comments

Comments
 (0)