Skip to content

Commit

Permalink
Add new template, update Readme and Changes files
Browse files Browse the repository at this point in the history
  • Loading branch information
board707 committed Aug 23, 2024
1 parent 539b6f2 commit 9d630f4
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# ChangeLog
## [1.1.5] - 2024-08-23
- Fix issue #124 - FM6126 not works after v1.1.0
- Fix issue #115 - add clock settings for overclocked RP2040
- Make DMD_RGB_SHIFTREG_ABC compatible with variadic templates
- Add Wiki docs
- Add new template

## [1.1.4] - 2024-04-12
- Fix "text not smooth" issue #86
- Change <COLOR_4BITS> to <COLOR_4BITS_Packed> mode in STM32F1 examples due to incompatibility
Expand Down
45 changes: 45 additions & 0 deletions DMD_Panel_Templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
#define RGB80x40_S10_OKSingra 4,80,40,10,102,16,PATTERN_LPS // 80x40 s10 16pixbase, BINARY, from OKSingra, issue #88
#define RGB32x16_s4_miralay001 2,32,16,4,102,8,PATTERN_UPS // 32x16 s4 8pixbase, BINARY, from miralay001, issue #96
#define RGB80x40_S10_ShiPC123 3,80,40,10,102,4,PATTERN_UPS // 80x40 s10 4 pixbase, SHIFT_REG, from ShiPC123, issue #104
#define RGB80x40s10SR_digi55 3,80,40,10,122,16,1 // 80x40 s10, pixbase 16, SHIFT_REG from @digi55, issue #121


/*--------------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -395,6 +396,50 @@ class DMD_RGB<MUX_CNT, P_Width, P_Height, SCAN, 112, Pixbase, Pattern, COL_DEPTH
return base_addr;
}

};
//--------------------------------------------------------------------------------------
// *** Variadic templates ***
// outdoor matrix, BINARY/DIRECT mux
// with parametrized Pixbase consecutive byte, generalized
// 121 is analog to pattern 1 above, 122 is analog to 2
// scan quarter of height (i.e 64x32 1/8),
//
// Pattern with LPS/UPS switched every pixbase pixels
// Pattern = 0 - start from upper line
// Pattern = 1 - start from lower line
//
// used for @digi55 80x40 s10 panel issue 121
//--------------------------------------------------------------------------------------/

template <int MUX_CNT, int P_Width, int P_Height, int SCAN, int Pixbase, int Pattern, int COL_DEPTH>
class DMD_RGB<MUX_CNT, P_Width, P_Height, SCAN, 122, Pixbase, Pattern, COL_DEPTH> : public DMD_RGB_BASE2<COL_DEPTH>
{
public:
DMD_RGB(uint8_t* mux_list, byte _pin_nOE, byte _pin_SCLK, uint8_t* pinlist,
byte panelsWide, byte panelsHigh, bool d_buf = false) :
DMD_RGB_BASE2<COL_DEPTH>(MUX_CNT, mux_list, _pin_nOE, _pin_SCLK, pinlist,
panelsWide, panelsHigh, d_buf, COL_DEPTH, SCAN, P_Width, P_Height)
{
this->fast_Hbyte = false;
this->use_shift = false;
}
// Fast text shift is disabled for complex patterns, so we don't need the method
void disableFastTextShift(bool shift) override {}

protected:

uint16_t get_base_addr(int16_t& x, int16_t& y) override {
this->transform_XY(x, y);
uint8_t pol_y = y % this->pol_displ;
x += (y / this->DMD_PIXELS_DOWN) * this->WIDTH;
uint16_t base_addr = (pol_y % this->nRows) * this->x_len +
(x / Pixbase) * this->multiplex * Pixbase + x % Pixbase;
if ((Pattern + (x % P_Width)/Pixbase)%2) { if (pol_y < this->nRows) base_addr += Pixbase; }
else { if (pol_y >= this->nRows) base_addr += Pixbase; }

return base_addr;
}

};
//--------------------------------------------------------------------------------------
// Non-plain outdoor matrices
Expand Down
2 changes: 1 addition & 1 deletion DMD_STM32a.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*--------------------------------------------------------------------------------------
DMD_STM32a.h - advansed version of DMD_STM32.h
****** VERSION 1.1.0 ******
****** VERSION 1.1.5 ******
DMD_STM32.h - STM32 port of DMD.h library
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![GitHub last commit (branch)](https://img.shields.io/github/last-commit/board707/DMD_STM32/dev-V2) ![GitHub commits since tagged version (branch)](https://img.shields.io/github/commits-since/board707/DMD_STM32/v0.6.3) ![GitHub](https://img.shields.io/github/license/board707/DMD_STM32?color=g)

### Last version is v1.1.2 - Introduced multicolor for fixed and scrolling text
### Last major addition is v1.1.2 - Introduced multicolor for fixed and scrolling text
<img src="https://github.com/board707/DMD_STM32/blob/old-V1/.github/dmd_multicolor_small.jpg" style="text-align: center" />

See [video](https://youtu.be/lw87UqoO50E) and dmd_multicolor example for details.
Expand Down Expand Up @@ -42,7 +42,7 @@ LED panels supported
| Two-color indoor | HUB08 | 64x32 | 1/16 | DMD_RGB.h <br /> (work as RGB) |
| | | | | |
| RGB with FM6126a driver | HUB75 | 64x32 | 1/16 | DMD_RGB_6126a.h |
| RGB with FM6353/6363 S-PWM drivers | HUB75 | 128x64 | 1/32 | DMD_RGB_6353.h |
| RGB ICDN2153/FM6353/6363 S-PWM | HUB75 | 128x64 | 1/32 | DMD_RGB_6353.h |
| | | 64x32 | 1/16 | |

Read more about supported panels in the [Wiki/Supported panels](https://github.com/board707/DMD_STM32/wiki/quick_start#supported-panels). The set of supported matrices is constantly updated.
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=DMD_STM32
version=1.1.4
version=1.1.5
author=Dmitry Dmitriev <[email protected]>
maintainer=Dmitry Dmitriev <[email protected]>
sentence=STM32 library for led matrix panels
Expand Down

0 comments on commit 9d630f4

Please sign in to comment.