v1.7.61 (LED matrix support)
This commit is contained in:
		
							parent
							
								
									c0a767e833
								
							
						
					
					
						commit
						19849c4eea
					
				@ -1,15 +1,15 @@
 | 
				
			|||||||
#ifndef _IRQHANDLER_H
 | 
					#ifndef _IRQHANDLER_H
 | 
				
			||||||
#define _IRQHANDLER_H
 | 
					#define _IRQHANDLER_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define DISPLAY_IRQ 0x01
 | 
					#define DISPLAY_IRQ 0x001
 | 
				
			||||||
#define BUTTON_IRQ 0x02
 | 
					#define BUTTON_IRQ 0x002
 | 
				
			||||||
#define MATRIX_DISPLAY_IRQ 0x03
 | 
					#define SENDCYCLE_IRQ 0x004
 | 
				
			||||||
#define SENDCYCLE_IRQ 0x04
 | 
					#define CYCLIC_IRQ 0x008
 | 
				
			||||||
#define CYCLIC_IRQ 0x08
 | 
					#define TIMESYNC_IRQ 0x010
 | 
				
			||||||
#define TIMESYNC_IRQ 0x10
 | 
					#define MASK_IRQ 0x020
 | 
				
			||||||
#define MASK_IRQ 0x20
 | 
					#define UNMASK_IRQ 0x040
 | 
				
			||||||
#define UNMASK_IRQ 0x40
 | 
					#define GPS_IRQ 0x080
 | 
				
			||||||
#define GPS_IRQ 0x80
 | 
					#define MATRIX_DISPLAY_IRQ 0x100
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "globals.h"
 | 
					#include "globals.h"
 | 
				
			||||||
#include "cyclic.h"
 | 
					#include "cyclic.h"
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,6 @@
 | 
				
			|||||||
#include "LEDMatrix.h"
 | 
					#include "LEDMatrix.h"
 | 
				
			||||||
#include "ledmatrixfonts.h"
 | 
					#include "ledmatrixfonts.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern uint8_t MatrixDisplayIsOn;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern LEDMatrix matrix;
 | 
					extern LEDMatrix matrix;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void init_matrix_display(const char *Productname, const char *Version);
 | 
					void init_matrix_display(const char *Productname, const char *Version);
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
; ---> SELECT TARGET PLATFORM HERE! <---
 | 
					; ---> SELECT TARGET PLATFORM HERE! <---
 | 
				
			||||||
[platformio]
 | 
					[platformio]
 | 
				
			||||||
env_default = generic
 | 
					;env_default = generic
 | 
				
			||||||
;env_default = ebox
 | 
					;env_default = ebox
 | 
				
			||||||
;env_default = eboxtube
 | 
					;env_default = eboxtube
 | 
				
			||||||
;env_default = ecopower
 | 
					;env_default = ecopower
 | 
				
			||||||
@ -24,7 +24,7 @@ env_default = generic
 | 
				
			|||||||
;env_default = lolin32litelora
 | 
					;env_default = lolin32litelora
 | 
				
			||||||
;env_default = lolin32lora
 | 
					;env_default = lolin32lora
 | 
				
			||||||
;env_default = lolin32lite
 | 
					;env_default = lolin32lite
 | 
				
			||||||
;env_default = wemos32oled
 | 
					env_default = wemos32oled
 | 
				
			||||||
;env_default = octopus32
 | 
					;env_default = octopus32
 | 
				
			||||||
;env_default = ecopower, eboxtube, heltec, ttgobeam, lopy4, lopy, ttgov21old, ttgov21new, ttgofox
 | 
					;env_default = ecopower, eboxtube, heltec, ttgobeam, lopy4, lopy, ttgov21old, ttgov21new, ttgofox
 | 
				
			||||||
;
 | 
					;
 | 
				
			||||||
@ -32,7 +32,7 @@ description = Paxcounter is a proof-of-concept ESP32 device for metering passeng
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[common]
 | 
					[common]
 | 
				
			||||||
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
 | 
					; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
 | 
				
			||||||
release_version = 1.7.6
 | 
					release_version = 1.7.61
 | 
				
			||||||
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
 | 
					; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
 | 
				
			||||||
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
 | 
					; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
 | 
				
			||||||
debug_level = 3
 | 
					debug_level = 3
 | 
				
			||||||
@ -70,7 +70,6 @@ lib_deps_all =
 | 
				
			|||||||
    ${common.lib_deps_display}
 | 
					    ${common.lib_deps_display}
 | 
				
			||||||
    ${common.lib_deps_rgbled}
 | 
					    ${common.lib_deps_rgbled}
 | 
				
			||||||
    ${common.lib_deps_gps}
 | 
					    ${common.lib_deps_gps}
 | 
				
			||||||
    ${common.lib_deps_matrix_display}
 | 
					 | 
				
			||||||
build_flags_basic =
 | 
					build_flags_basic =
 | 
				
			||||||
    -include "src/hal/${PIOENV}.h"
 | 
					    -include "src/hal/${PIOENV}.h"
 | 
				
			||||||
    -include "src/paxcounter.conf"
 | 
					    -include "src/paxcounter.conf"
 | 
				
			||||||
@ -371,6 +370,7 @@ upload_speed = 921600
 | 
				
			|||||||
lib_deps =
 | 
					lib_deps =
 | 
				
			||||||
    ${common.lib_deps_basic}
 | 
					    ${common.lib_deps_basic}
 | 
				
			||||||
    ${common.lib_deps_display}
 | 
					    ${common.lib_deps_display}
 | 
				
			||||||
 | 
					    ${common.lib_deps_matrix_display}
 | 
				
			||||||
build_flags =
 | 
					build_flags =
 | 
				
			||||||
    ${common.build_flags_all}
 | 
					    ${common.build_flags_all}
 | 
				
			||||||
upload_protocol = ${common.upload_protocol}
 | 
					upload_protocol = ${common.upload_protocol}
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@
 | 
				
			|||||||
static const char TAG[] = __FILE__;
 | 
					static const char TAG[] = __FILE__;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint8_t MatrixDisplayIsOn = 0;
 | 
					uint8_t MatrixDisplayIsOn = 0;
 | 
				
			||||||
unsigned long ulLastNumMacs = 0;
 | 
					static unsigned long ulLastNumMacs = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LEDMatrix matrix(LED_MATRIX_LA_74138, LED_MATRIX_LB_74138, LED_MATRIX_LC_74138,
 | 
					LEDMatrix matrix(LED_MATRIX_LA_74138, LED_MATRIX_LB_74138, LED_MATRIX_LC_74138,
 | 
				
			||||||
                 LED_MATRIX_LD_74138, LED_MATRIX_EN_74138, LED_MATRIX_DATA_R1,
 | 
					                 LED_MATRIX_LD_74138, LED_MATRIX_EN_74138, LED_MATRIX_DATA_R1,
 | 
				
			||||||
@ -31,6 +31,15 @@ void init_matrix_display(const char *Productname, const char *Version) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void refreshTheMatrixDisplay() {
 | 
					void refreshTheMatrixDisplay() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // if Matrixdisplay is switched off we don't refresh it to relax cpu
 | 
				
			||||||
 | 
					  if (!MatrixDisplayIsOn && (MatrixDisplayIsOn == cfg.screenon))
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // set display on/off according to current device configuration
 | 
				
			||||||
 | 
					  if (MatrixDisplayIsOn != cfg.screenon) {
 | 
				
			||||||
 | 
					    MatrixDisplayIsOn = cfg.screenon;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (ulLastNumMacs != macs.size()) {
 | 
					  if (ulLastNumMacs != macs.size()) {
 | 
				
			||||||
    ulLastNumMacs = macs.size();
 | 
					    ulLastNumMacs = macs.size();
 | 
				
			||||||
    matrix.clear();
 | 
					    matrix.clear();
 | 
				
			||||||
 | 
				
			|||||||
@ -52,7 +52,7 @@ So don't do it if you do not own a digital oscilloscope.
 | 
				
			|||||||
0	displayIRQ -> display refresh -> 40ms (DISPLAYREFRESH_MS)
 | 
					0	displayIRQ -> display refresh -> 40ms (DISPLAYREFRESH_MS)
 | 
				
			||||||
1 ppsIRQ -> pps clock irq -> 1sec
 | 
					1 ppsIRQ -> pps clock irq -> 1sec
 | 
				
			||||||
2	gpsIRQ -> gps store data -> 300ms
 | 
					2	gpsIRQ -> gps store data -> 300ms
 | 
				
			||||||
3	unused
 | 
					3	MatrixDisplayIRQ -> matrix mux cycle -> 0,5ms (MATRIX_DISPLAY_SCAN_US)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Interrupt routines
 | 
					// Interrupt routines
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user