-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lvgl' of https://github.com/mutatrum/ESP-Miner into lvg…
…l-all-the-things
- Loading branch information
Showing
12 changed files
with
141 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build & Release Recovery Images [Pre-Release] | ||
|
||
on: | ||
release: | ||
types: [prereleased] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: "Recovery ${{ matrix.build_type }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build_type: ["102", "202", "204", "205", "401", "402", "403", "601"] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
- name: Build web dist | ||
working-directory: ./main/http_server/axe-os | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: esp-idf build | ||
uses: espressif/esp-idf-ci-action@v1 | ||
with: | ||
esp_idf_version: v5.3.1 | ||
target: esp32s3 | ||
command: GITHUB_ACTIONS="true" idf.py build | ||
path: '.' | ||
- name: Disable self test on recovery images. | ||
run: "sed -i 's/selftest,data,u16,1/selftest,data,u16,0/g' config-${{ matrix.build_type }}.cvs" | ||
- name: "esp-idf build recovery config for ${{ matrix.build_type }}" | ||
uses: espressif/esp-idf-ci-action@v1 | ||
with: | ||
esp_idf_version: v5.3.1 | ||
target: esp32s3 | ||
command: /opt/esp/idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate config-${{ matrix.build_type }}.cvs config.bin 0x6000 | ||
path: '.' | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- run: pip install esptool | ||
- name: "Create recovery image for ${{ matrix.build_type }}-${{ github.ref_name }}" | ||
run: "./merge_bin.sh -c esp-miner-recovery-${{ matrix.build_type }}-${{ github.ref_name }}.bin" | ||
- name: Release esp-miner.bin | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
prerelease: true | ||
files: "esp-miner-recovery-${{ matrix.build_type }}-${{ github.ref_name }}.bin" |
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,56 @@ | ||
name: Build & Release Recovery Images [Release] | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: "Recovery ${{ matrix.build_type }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build_type: ["102", "202", "204", "205", "401", "402", "403", "601"] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
- name: Build web dist | ||
working-directory: ./main/http_server/axe-os | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: esp-idf build | ||
uses: espressif/esp-idf-ci-action@v1 | ||
with: | ||
esp_idf_version: v5.3.1 | ||
target: esp32s3 | ||
command: GITHUB_ACTIONS="true" idf.py build | ||
path: '.' | ||
- name: Disable self test on recovery images. | ||
run: "sed -i 's/selftest,data,u16,1/selftest,data,u16,0/g' config-${{ matrix.build_type }}.cvs" | ||
- name: "esp-idf build recovery config for ${{ matrix.build_type }}" | ||
uses: espressif/esp-idf-ci-action@v1 | ||
with: | ||
esp_idf_version: v5.3.1 | ||
target: esp32s3 | ||
command: /opt/esp/idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate config-${{ matrix.build_type }}.cvs config.bin 0x6000 | ||
path: '.' | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- run: pip install esptool | ||
- name: "Create recovery image for ${{ matrix.build_type }}-${{ github.ref_name }}" | ||
run: "./merge_bin.sh -c esp-miner-recovery-${{ matrix.build_type }}-${{ github.ref_name }}.bin" | ||
- name: Release esp-miner.bin | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: "esp-miner-recovery-${{ matrix.build_type }}-${{ github.ref_name }}.bin" |
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 |
---|---|---|
@@ -1,35 +0,0 @@ | ||
input[type="text"], | ||
input[type="number"], | ||
input[type="password"], | ||
input[type="range"] { | ||
min-width: 250px; | ||
max-width: 90%; | ||
} | ||
|
||
select { | ||
min-width: 268px; | ||
max-width: 90%; | ||
} | ||
|
||
.restart { | ||
margin-bottom: 1.5rem; | ||
|
||
} | ||
|
||
@media only screen and (min-width:900px) { | ||
|
||
input[type="text"], | ||
input[type="password"], | ||
input[type="number"], | ||
input[type="range"] { | ||
min-width: 500px | ||
} | ||
|
||
select { | ||
min-width: 518px | ||
} | ||
} | ||
|
||
a { | ||
color: white; | ||
} | ||
56 changes: 2 additions & 54 deletions
56
main/http_server/axe-os/src/app/components/network/network.component.ts
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 |
---|---|---|
@@ -1,62 +1,10 @@ | ||
import { HttpErrorResponse, HttpEventType } from '@angular/common/http'; | ||
import { Component } from '@angular/core'; | ||
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | ||
import { ToastrService } from 'ngx-toastr'; | ||
import { map, Observable, shareReplay, startWith } from 'rxjs'; | ||
import { LoadingService } from 'src/app/services/loading.service'; | ||
import { SystemService } from 'src/app/services/system.service'; | ||
|
||
@Component({ | ||
selector: 'app-network', | ||
templateUrl: './network.component.html', | ||
styleUrls: ['./network.component.scss'] | ||
styleUrls: ['./network.component.scss'], | ||
}) | ||
export class NetworkComponent { | ||
|
||
public form!: FormGroup; | ||
|
||
public info$: Observable<any>; | ||
|
||
constructor( | ||
private fb: FormBuilder, | ||
private systemService: SystemService, | ||
private toastr: ToastrService, | ||
private toastrService: ToastrService, | ||
private loadingService: LoadingService, | ||
) { | ||
this.info$ = this.systemService.getInfo().pipe(shareReplay({refCount: true, bufferSize: 1})) | ||
|
||
this.info$.pipe(this.loadingService.lockUIUntilComplete()) | ||
.subscribe(info => { | ||
this.form = this.fb.group({ | ||
hostname: [info.hostname, [Validators.required]], | ||
ssid: [info.ssid, [Validators.required]], | ||
wifiPass: ['*****'], | ||
}); | ||
}); | ||
|
||
} | ||
|
||
public updateSystem() { | ||
|
||
const form = this.form.getRawValue(); | ||
|
||
// Allow an empty wifi password | ||
form.wifiPass = form.wifiPass == null ? '' : form.wifiPass; | ||
|
||
if (form.wifiPass === '*****') { | ||
delete form.wifiPass; | ||
} | ||
|
||
this.systemService.updateSystem(undefined, form) | ||
.pipe(this.loadingService.lockUIUntilComplete()) | ||
.subscribe({ | ||
next: () => { | ||
this.toastr.success('Success!', 'Saved.'); | ||
}, | ||
error: (err: HttpErrorResponse) => { | ||
this.toastr.error('Error.', `Could not save. ${err.message}`); | ||
} | ||
}); | ||
} | ||
constructor() {} | ||
} |
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