Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e50f1f
commit 2359280
Showing
48 changed files
with
385 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export function bit_check(num, bit) { | ||
return (num >> bit) % 2 != 0; | ||
} | ||
|
||
export function bit_set(num, bit) { | ||
return num | (1 << bit); | ||
} | ||
|
||
export function bit_clear(num, bit) { | ||
return num & ~(1 << bit); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* log to GUI | ||
* @param {string} message message to log to GUI | ||
*/ | ||
export function gui_log(message) { | ||
const commandLog = $("div#log"); | ||
const d = new Date(); | ||
const year = d.getFullYear(); | ||
const month = d.getMonth() < 9 ? `0${d.getMonth() + 1}` : d.getMonth() + 1; | ||
const date = d.getDate() < 10 ? `0${d.getDate()}` : d.getDate(); | ||
const hours = d.getHours() < 10 ? `0${d.getHours()}` : d.getHours(); | ||
const minutes = d.getMinutes() < 10 ? `0${d.getMinutes()}` : d.getMinutes(); | ||
const seconds = d.getSeconds() < 10 ? `0${d.getSeconds()}` : d.getSeconds(); | ||
const time = `${hours}:${minutes}:${seconds}`; | ||
|
||
const formattedDate = `${year}-${month}-${date} @${time}`; | ||
$("div.wrapper", commandLog).append( | ||
`<p>${formattedDate} -- ${message}</p>`, | ||
); | ||
commandLog.scrollTop($("div.wrapper", commandLog).height()); | ||
} |
Oops, something went wrong.