TVDOS: minor improvements

This commit is contained in:
minjaesong
2026-05-16 12:26:45 +09:00
parent 135c7b9c4e
commit 00c0e18c1a
6 changed files with 15 additions and 10 deletions

View File

@@ -1406,9 +1406,6 @@ let requireFromMemory = (ptr) => {
}*/
var GL = require("A:/tvdos/include/gl.mjs")
// @param cmdsrc JS source code
// @param args arguments for the program, must be Array, and args[0] is always the name of the program, e.g.
// for command line 'echo foo bar', args[0] must be 'echo'
@@ -1421,7 +1418,7 @@ var execApp = (cmdsrc, args, appname) => {
`var ${appname}=function(exec_args){${injectIntChk(cmdsrc, intchkFunName)}\n};` +
`${appname}`); // making 'exec_args' a app-level global
execAppPrg(args);
return execAppPrg(args);
}

View File

@@ -686,7 +686,7 @@ require = function(path) {
}
}
shell.execute = function(line) {
shell.execute = function(line, nameOverride) {
if (0 == line.size) return
let parsedTokens = shell.parse(line) // echo, "hai", |, less
let statements = [] // [[echo, "hai"], [less]]
@@ -835,7 +835,7 @@ shell.execute = function(line) {
// replace $0
newLine = newLine.replaceAll('$0', tokens.slice(1).join(' '))
shell.execute(newLine)
shell.execute(newLine, cmd)
})
}
else if ("APP" == extension) {
@@ -852,6 +852,10 @@ shell.execute = function(line) {
errorlevel = 0 // reset the number
if (_G.shellProgramTitles === undefined) _G.shellProgramTitles = []
if (nameOverride !== undefined) {
tokens[0] = (''+nameOverride)
cmd = tokens[0]
}
_G.shellProgramTitles.push(cmd.toUpperCase())
sendLcdMsg(_G.shellProgramTitles[_G.shellProgramTitles.length - 1])
//serial.println(_G.shellProgramTitles)

View File

@@ -116,7 +116,8 @@ Timeline has two distinct modes: view and edit mode. Two modes are toggled using
<b>&nbsp;GLOBAL EDIT</b>
<b>\u00B7${'\u00B8'.repeat(11)}\u00B9</b>
&bul;<b>Q</b> : <O>retune current song into different tuning</O>
&bul;<b>Q</b> : <O>retune current song into different tuning and strategy</O>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<O>In general, nearest-note works best for macrotonals, nearest-harmonic and nearest-delta works best for highly microtonals (31+); 17- and 19-TET takes nearest-harmonic pretty well, while 22-TET seem to only benefit from the nearest-note</O>
`
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -66,7 +66,7 @@ const EXEC_FUNS = {
"txt": (f) => _G.shell.execute(`less "${f}"`),
"md": (f) => _G.shell.execute(`less "${f}"`),
"log": (f) => _G.shell.execute(`less "${f}"`),
"taud": (f) => _G.shell.execute(`taut "${f}"`),
"taud": (f) => _G.shell.execute(`microtone "${f}"`),
}
let windowMode = 0 // 0 == left, 1 == right