Skip to content

Commit

Permalink
Merge pull request #86 from shufps/new-ui
Browse files Browse the repository at this point in the history
New UI
  • Loading branch information
shufps authored Feb 16, 2025
2 parents 5d6ee5d + a7ab31b commit 36a789a
Show file tree
Hide file tree
Showing 227 changed files with 10,919 additions and 12,519 deletions.
2 changes: 2 additions & 0 deletions main/boards/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class Board {

virtual void requestBuckTelemtry() = 0;

virtual void shutdown() = 0;

virtual bool getPSUFault() {
return false;
}
Expand Down
4 changes: 4 additions & 0 deletions main/boards/nerdaxe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ bool NerdAxe::initBoard()
return true;
}

void NerdAxe::shutdown() {
// NOP / TODO
}

bool NerdAxe::initAsics()
{
// disable buck (disables EN pin)
Expand Down
2 changes: 2 additions & 0 deletions main/boards/nerdaxe.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class NerdAxe : public Board {
public:
NerdAxe();

virtual void shutdown();

virtual bool initBoard();
virtual bool initAsics();

Expand Down
4 changes: 4 additions & 0 deletions main/boards/nerdaxegamma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ bool NerdaxeGamma::initBoard()
return true;
}

void NerdaxeGamma::shutdown() {
// NOP / TODO
}

bool NerdaxeGamma::initAsics() {

// set output voltage
Expand Down
4 changes: 3 additions & 1 deletion main/boards/nerdaxegamma.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
class NerdaxeGamma : public NerdAxe {
protected:
float m_initVoltage;

public:
NerdaxeGamma();

virtual bool initBoard();
virtual bool initAsics();

virtual void shutdown();

// abstract common methos
virtual bool setVoltage(float core_voltage);

Expand Down
10 changes: 10 additions & 0 deletions main/boards/nerdqaxeplus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ bool NerdQaxePlus::initBoard()
return true;
}

void NerdQaxePlus::shutdown() {
setVoltage(0.0);

vTaskDelay(500 / portTICK_PERIOD_MS);

LDO_disable();

vTaskDelay(500 / portTICK_PERIOD_MS);
}

bool NerdQaxePlus::initAsics()
{
// disable buck (disables EN pin)
Expand Down
2 changes: 2 additions & 0 deletions main/boards/nerdqaxeplus.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class NerdQaxePlus : public Board {
virtual bool initBoard();
virtual bool initAsics();

virtual void shutdown();

// abstract common methos
virtual bool setVoltage(float core_voltage);

Expand Down
21 changes: 14 additions & 7 deletions main/http_server/axe-os/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
"style": "scss",
"standalone": false
},
"@schematics/angular:directive": {
"standalone": false
},
"@schematics/angular:pipe": {
"standalone": false
}
},
"root": "",
Expand All @@ -30,8 +37,8 @@
"src/assets"
],
"styles": [
"src/styles.scss",
"node_modules/ngx-toastr/toastr.css"
"node_modules/@nebular/theme/styles/prebuilt/corporate.css",
"src/app/@theme/styles/styles.scss"
],
"scripts": []
},
Expand All @@ -46,13 +53,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "3mb"
"maximumWarning": "5mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "3mb",
"maximumError": "4mb"
}
],
"outputHashing": "all"
Expand Down
26 changes: 18 additions & 8 deletions main/http_server/axe-os/only-gzip.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ const path = require('path');
const directory = './dist/axe-os';

fs.readdir(directory, (err, files) => {
if (err) throw err;
if (err) throw err;

for (const file of files) {
if (!file.endsWith('.gz')) {
fs.unlink(path.join(directory, file), err => {
if (err) throw err;
});
for (const file of files) {
const filePath = path.join(directory, file);

fs.stat(filePath, (err, stats) => {
if (err) throw err;

if (stats.isDirectory()) {
// NOP
} else if (!file.endsWith('.gz')) {
// If it's a file and doesn't end with .gz, unlink it
fs.unlink(filePath, (err) => {
if (err) throw err;
console.log(`Removed file: ${filePath}`);
});
}
});
}
}
});
});
Loading

0 comments on commit 36a789a

Please sign in to comment.