Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 23 additions & 32 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Nerdminer Pre-Release
on:
push:
branches:
- prerelease
- dev

jobs:
build:
Expand All @@ -25,24 +25,17 @@ jobs:
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: pio run
- name: Debug - Check generated files
run: |
echo "=== All .bin files found ==="
find . -name "*.bin" -type f
echo "=== Directory structure ==="
ls -la
echo "=== .pio/build contents ==="
find .pio/build -name "*.bin" -type f 2>/dev/null || echo "No .pio/build files"
echo "=== firmware directory ==="
ls -la firmware/ 2>/dev/null || echo "No firmware directory"
find firmware -name "*.bin" -type f 2>/dev/null || echo "No firmware .bin files"
echo "=== Script check ==="
ls -la post_build_merge.py
- name: Archive firmware files
- name: Archive built binaries
uses: actions/upload-artifact@v4
with:
name: firmware-files-${{ github.sha }}
path: firmware/
name: built-binaries-${{ github.sha }}
path: .pio/build/*/*.bin
if-no-files-found: error
- name: Archive bootapp binary
uses: actions/upload-artifact@v4
with:
name: bootapp-binary-${{ github.sha }}
path: ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
if-no-files-found: error
- name: Get version
id: version_step
Expand All @@ -54,23 +47,21 @@ jobs:
contents: write
discussions: write
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/prerelease'
if: github.ref == 'refs/heads/dev'
steps:
- name: Download firmware files
- name: Download built binaries
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/binaries
name: built-binaries-${{ github.sha }}
- name: Download bootapp binary
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/
name: firmware-files-${{ github.sha }}
- name: Debug - Check downloaded files
run: |
echo "=== Working directory ==="
pwd
ls -la
echo "=== All .bin files after download ==="
find . -name "*.bin" -type f
echo "=== firmware directory after download ==="
find firmware -type f 2>/dev/null || echo "No firmware directory found"
- name: Prerelease
path: ${{ github.workspace }}/binaries
name: bootapp-binary-${{ github.sha }}
- name: Rename built binaries
run: find ${{ github.workspace }}/binaries -mindepth 2 -maxdepth 3 -type f -name "*.bin" -exec sh -c 'cp "$0" "${{ github.workspace }}/binaries/$(basename $(dirname "$0"))_$(basename $0)"' {} \;
- name: Pre-release
uses: softprops/action-gh-release@v2
with:
name: nerdminer-prerelease-${{ needs.build.outputs.version }}
Expand All @@ -79,5 +70,5 @@ jobs:
generate_release_notes: true
prerelease: true
fail_on_unmatched_files: true
files: ${{ github.workspace }}/**/*.bin
files: ${{ github.workspace }}/binaries/*.bin

31 changes: 22 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Nerdminer Release
on:
push:
branches:
- main
- master

jobs:
build:
Expand All @@ -25,11 +25,17 @@ jobs:
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: pio run
- name: Archive firmware files
- name: Archive built binaries
uses: actions/upload-artifact@v4
with:
name: firmware-files-${{ github.sha }}
path: firmware/
name: built-binaries-${{ github.sha }}
path: .pio/build/*/*.bin
if-no-files-found: error
- name: Archive bootapp binary
uses: actions/upload-artifact@v4
with:
name: bootapp-binary-${{ github.sha }}
path: ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
if-no-files-found: error
- name: Get version
id: version_step
Expand All @@ -42,7 +48,7 @@ jobs:
discussions: write
issues: write
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
steps:
- uses: trstringer/manual-approval@v1
timeout-minutes: 120
Expand All @@ -53,11 +59,18 @@ jobs:
issue-title: "Releasing Nerdminer version ${{ needs.build.outputs.version }}"
issue-body: "Please approve or deny the release of ${{ needs.build.outputs.version }}."
exclude-workflow-initiator-as-approver: false
- name: Download firmware files
- name: Download built binaries
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/binaries
name: built-binaries-${{ github.sha }}
- name: Download bootapp binary
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/
name: firmware-files-${{ github.sha }}
path: ${{ github.workspace }}/binaries
name: bootapp-binary-${{ github.sha }}
- name: Rename built binaries
run: find ${{ github.workspace }}/binaries -mindepth 2 -maxdepth 3 -type f -name "*.bin" -exec sh -c 'cp "$0" "${{ github.workspace }}/binaries/$(basename $(dirname "$0"))_$(basename $0)"' {} \;
- name: Release
uses: softprops/action-gh-release@v2
with:
Expand All @@ -67,5 +80,5 @@ jobs:
generate_release_notes: true
make_latest: true
fail_on_unmatched_files: true
files: ${{ github.workspace }}/**/*.bin
files: ${{ github.workspace }}/binaries/*.bin

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ Every time an stratum job notification is received miner update its current work
- ESP32-C3 Super Mini ([Board Info](https://docs.platformio.org/en/latest/boards/espressif32/seeed_xiao_esp32c3.html))
- Waveshare ESP32-S3-GEEK ([Board Info](https://www.waveshare.com/wiki/ESP32-S3-GEEK))
- LILYGO T-HMI ([Aliexpress link\*](https://s.click.aliexpress.com/e/_oFII4s2)) / Dev support: @cosmicpsyop
- ESP32-C3 0.42 Inch OLED ([Aliexpress link\*](https://s.click.aliexpress.com/e/_oDmT4Id) / Dev support: @mrthiti / ⚡ wallet@thiti.dev)
- ESP32-S3 0.42 Inch OLED ([Aliexpress link\*](https://s.click.aliexpress.com/e/_oFIMUoh) / Dev support: @mrthiti / ⚡ wallet@thiti.dev)

\*Affiliate links

Expand Down Expand Up @@ -150,8 +148,6 @@ Recommended low difficulty share pools:
| pool.nerdminer.io | 3333 | https://nerdminer.io | Mantained by CHMEX |
| pool.pyblock.xyz | 3333 | https://pool.pyblock.xyz/ | Mantained by curly60e |
| pool.sethforprivacy.com | 3333 | https://pool.sethforprivacy.com/ | Mantained by @sethforprivacy - public-pool fork |
| pool.stompi.de | 3333 | http://web.stompi.de | Mantained by @odinstar - public-pool fork |
|pool.solomining.de| 3333 | https://pool.solomining.de/ | Mantained by https://x.com/solo_mining |

Other standard pools not compatible with low difficulty share:

Expand Down
26 changes: 13 additions & 13 deletions lib/TFT_eSPI/Extensions/Smooth_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void TFT_eSPI::loadFont(String fontName, bool flash)
6. Descent in pixels from baseline to bottom of "p"

Next are gCount sets of values for each glyph, each set comprises 7 int32t parameters (28 bytes):
1. Glyph Unicode stored as a 32-bit value
1. Glyph Unicode stored as a 32 bit value
2. Height of bitmap bounding box
3. Width of bitmap bounding box
4. gxAdvance for cursor (setWidth in Processing)
Expand All @@ -57,7 +57,7 @@ void TFT_eSPI::loadFont(String fontName, bool flash)
7. padding value, typically 0

The bitmaps start next at 24 + (28 * gCount) bytes from the start of the file.
Each pixel is 1 byte, an 8-bit Alpha value which represents the transparency from
Each pixel is 1 byte, an 8 bit Alpha value which represents the transparency from
0xFF foreground colour, 0x00 background. The library uses a linear interpolation
between the foreground and background RGB component colours. e.g.
pixelRed = ((fgRed * alpha) + (bgRed * (255 - alpha))/255
Expand Down Expand Up @@ -158,7 +158,7 @@ void TFT_eSPI::loadMetrics(void)
#if defined (ESP32) && defined (CONFIG_SPIRAM_SUPPORT)
if ( psramFound() )
{
gUnicode = (uint16_t*)ps_malloc( gFont.gCount * 2); // Unicode 16-bit Basic Multilingual Plane (0-FFFF)
gUnicode = (uint16_t*)ps_malloc( gFont.gCount * 2); // Unicode 16 bit Basic Multilingual Plane (0-FFFF)
gHeight = (uint8_t*)ps_malloc( gFont.gCount ); // Height of glyph
gWidth = (uint8_t*)ps_malloc( gFont.gCount ); // Width of glyph
gxAdvance = (uint8_t*)ps_malloc( gFont.gCount ); // xAdvance - to move x cursor
Expand All @@ -169,7 +169,7 @@ void TFT_eSPI::loadMetrics(void)
else
#endif
{
gUnicode = (uint16_t*)malloc( gFont.gCount * 2); // Unicode 16-bit Basic Multilingual Plane (0-FFFF)
gUnicode = (uint16_t*)malloc( gFont.gCount * 2); // Unicode 16 bit Basic Multilingual Plane (0-FFFF)
gHeight = (uint8_t*)malloc( gFont.gCount ); // Height of glyph
gWidth = (uint8_t*)malloc( gFont.gCount ); // Width of glyph
gxAdvance = (uint8_t*)malloc( gFont.gCount ); // xAdvance - to move x cursor
Expand Down Expand Up @@ -308,26 +308,26 @@ void TFT_eSPI::unloadFont( void )

/***************************************************************************************
** Function name: readInt32
** Description: Get a 32-bit integer from the font file
** Description: Get a 32 bit integer from the font file
*************************************************************************************x*/
uint32_t TFT_eSPI::readInt32(void)
{
uint32_t val = 0;

#ifdef FONT_FS_AVAILABLE
if (fs_font) {
val = (uint32_t)fontFile.read() << 24;
val |= (uint32_t)fontFile.read() << 16;
val |= (uint32_t)fontFile.read() << 8;
val |= (uint32_t)fontFile.read();
val = fontFile.read() << 24;
val |= fontFile.read() << 16;
val |= fontFile.read() << 8;
val |= fontFile.read();
}
else
#endif
{
val = (uint32_t)pgm_read_byte(fontPtr++) << 24;
val |= (uint32_t)pgm_read_byte(fontPtr++) << 16;
val |= (uint32_t)pgm_read_byte(fontPtr++) << 8;
val |= (uint32_t)pgm_read_byte(fontPtr++);
val = pgm_read_byte(fontPtr++) << 24;
val |= pgm_read_byte(fontPtr++) << 16;
val |= pgm_read_byte(fontPtr++) << 8;
val |= pgm_read_byte(fontPtr++);
}

return val;
Expand Down
29 changes: 13 additions & 16 deletions lib/TFT_eSPI/Extensions/Sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TFT_eSprite::TFT_eSprite(TFT_eSPI *tft)
** Function name: createSprite
** Description: Create a sprite (bitmap) of defined width and height
***************************************************************************************/
// cast returned value to (uint8_t*) for 8-bit or (uint16_t*) for 16-bit colours
// cast returned value to (uint8_t*) for 8 bit or (uint16_t*) for 16 bit colours
void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames)
{

Expand Down Expand Up @@ -88,6 +88,8 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames)
_img8_2 = _img8 + (w * h + 1);
}

if ( (_bpp == 4) && (_colorMap == nullptr)) createPalette(default_4bit_palette);

// This is to make it clear what pointer size is expected to be used
// but casting in the user sketch is needed due to the use of void*
if ( (_bpp == 1) && (frames > 1) )
Expand All @@ -99,8 +101,6 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames)
if (_img8)
{
_created = true;
if ( (_bpp == 4) && (_colorMap == nullptr)) createPalette(default_4bit_palette);

rotation = 0;
setViewport(0, 0, _dwidth, _dheight);
setPivot(_iwidth/2, _iheight/2);
Expand Down Expand Up @@ -776,7 +776,7 @@ bool TFT_eSprite::pushToSprite(TFT_eSprite *dspr, int32_t x, int32_t y, uint16_t

if (transp == rp) {
if (pixel_count) {
dspr->pushImage(ox, y, pixel_count, 1, sline_buffer);
dspr->pushImage(ox, y, pixel_count, 1, sline_buffer, _bpp);
ox += pixel_count;
pixel_count = 0;
}
Expand Down Expand Up @@ -1104,7 +1104,7 @@ void TFT_eSprite::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_
}
else if (_bpp == 4)
{
// The image is assumed to be 4-bit, where each byte corresponds to two pixels.
// The image is assumed to be 4 bit, where each byte corresponds to two pixels.
// much faster when aligned to a byte boundary, because the alternative is slower, requiring
// tedious bit operations.

Expand Down Expand Up @@ -1355,10 +1355,10 @@ void TFT_eSprite::writeColor(uint16_t color)
{
if (!_created ) return;

// Write 16-bit RGB 565 encoded colour to RAM
// Write 16 bit RGB 565 encoded colour to RAM
if (_bpp == 16) _img [_xptr + _yptr * _iwidth] = color;

// Write 8-bit RGB 332 encoded colour to RAM
// Write 8 bit RGB 332 encoded colour to RAM
else if (_bpp == 8) _img8[_xptr + _yptr * _iwidth] = (uint8_t) color;

else if (_bpp == 4)
Expand Down Expand Up @@ -1985,6 +1985,10 @@ void TFT_eSprite::drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uin
{
if ( _vpOoB || !_created ) return;

if ((x >= _vpW - _xDatum) || // Clip right
(y >= _vpH - _yDatum)) // Clip bottom
return;

if (c < 32) return;
#ifdef LOAD_GLCD
//>>>>>>>>>>>>>>>>>>
Expand All @@ -1993,17 +1997,10 @@ void TFT_eSprite::drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uin
#endif
//>>>>>>>>>>>>>>>>>>

if ((x >= _vpW - _xDatum) || // Clip right
(y >= _vpH - _yDatum)) // Clip bottom
return;

if (((x + 6 * size - 1) < (_vpX - _xDatum)) || // Clip left
((y + 8 * size - 1) < (_vpY - _yDatum))) // Clip top
return;

if (c > 255) return;
if (!_cp437 && c > 175) c++;

bool fillbg = (bg != color);

if ((size==1) && fillbg)
Expand Down Expand Up @@ -2138,7 +2135,7 @@ void TFT_eSprite::drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uin

/***************************************************************************************
** Function name: drawChar
** Description: draw a Unicode glyph into the sprite
** Description: draw a unicode glyph into the sprite
***************************************************************************************/
// TODO: Rationalise with TFT_eSPI
// Any UTF-8 decoding must be done before calling drawChar()
Expand Down Expand Up @@ -2290,7 +2287,7 @@ int16_t TFT_eSprite::drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t fo

uint8_t tnp = 0; // Temporary copy of np for while loop
uint8_t ts = textsize - 1; // Temporary copy of textsize
// 16-bit pixel count so maximum font size is equivalent to 180x180 pixels in area
// 16 bit pixel count so maximum font size is equivalent to 180x180 pixels in area
// w is total number of pixels to plot to fill character block
while (pc < w) {
line = pgm_read_byte((uint8_t *)flash_address);
Expand Down
Loading