Commit Graph

19 Commits

Author SHA1 Message Date
Carsten Schmiemann f26ab797dc Clean up code 2022-07-29 18:49:08 +02:00
SASANO Takayoshi 483a886fa8 TFTSurenoo: initialize improvement
Sometimes the timing of transmitted data through Nextion UART port on
MMDVM board is not accurate. For example, 250ms delay of lcdReset() is
ignored.

(via MMDVM LCD-UART port)
[2021/10/29 23:04:57.481] RESET;
[2021/10/29 23:04:57.482] CLR(0);
[2021/10/29 23:04:58.100]
[2021/10/29 23:04:58.101] DIR(1);BL(50);SBC(0);
[2021/10/29 23:04:58.142] BOXF(0,0,159,127,0);DCV24(0,0,'MMDVM',4);DCV16(0,32,'JG1UAA / 440xxxx',5);DCV16(0,48,'IDLE',5);

(via native serial port)
[2021/10/30 08:11:21.587] RESET;
[2021/10/30 08:11:21.827] CLR(0);
[2021/10/30 08:11:37.478]
[2021/10/30 08:11:37.480] DIR(1);BL(50);SBC(0);
[2021/10/30 08:11:37.498] BOXF(0,0,159,127,0);DCV24(0,0,'MMDVM',4);DCV16(0,32,'JG1UAA / 440xxxx',5);DCV16(0,48,'IDLE',5);

Ignoring screen direction(DIR), background color(SBC) breaks screen layout.
To solve this, send some LCD configuration command at refreshDisplay().
This is not smart solution, but inevitable.
2021-10-30 08:48:15 +09:00
Jonathan Naylor d77e2a00ce Restore the branch 2020-12-15 16:21:07 +00:00
Jonathan Naylor 135fd04e0d Revert "Merge branch 'M17_AX25_FM'"
This reverts commit e1427e3e37, reversing
changes made to bcdba292eb.
2020-12-15 15:52:27 +00:00
Jonathan Naylor e0f4928db5 Handle M17 in the display code. 2020-10-15 14:32:56 +01:00
Jonathan Naylor c7fbeecc50 Change the displays to show the DG-ID instead of the TO field for YSF. 2020-08-09 19:23:18 +01:00
Jonathan Naylor f070410f7e Display and log the DG-ID in the Fusion mode. 2020-08-09 15:09:08 +01:00
Jonathan Naylor dcdfca39d7 Add FM mode display. 2020-04-11 20:42:05 +01:00
SASANO Takayoshi e036ac8be3 revise snprintf() format string to simplify display layout (all modes) 2020-03-12 21:48:21 +09:00
SASANO Takayoshi cc62fb62b7 add NXDN user data display 2020-03-10 06:14:17 +09:00
SASANO Takayoshi 5bd54e97cb add writeDMRIntEx() to support UserDB display 2020-03-08 08:43:57 +09:00
SASANO Takayoshi 0bc6bcdb26 Fix DMR status display for duplex mode
Previous change (simplyfy DMR status display) did not consider
DMR duplex mode.

Now DMR simplex mode uses 2-lines style, duplex mode 4-lines like this.

	Listening
	TS1
	N Callsign
	TS2 TGxx

For this change, statusLine() no longer have meaning.
It will be removed in the future.
2020-02-29 06:51:26 +09:00
SASANO Takayoshi ead41ba9a5 Simplify DMR status display
Old DMR status display takes 4 lines i.e.:

	1 Listening
	(unused line here)
	2 N Callsign
	TGxx

To make room for display area for future development, DMR status display
are changed to 2-lines style like this:

	N Callsign
	TS2 TGxx

And, added three small changes:

	- use statusLine() macro to change layout easily
	- use two -> three colors
		yellow: radio mode (DMR, YSF, etc)
		cyan: main status (callsign, TG/Timeslot)
		dark green: additional information (D* reflector etc) *NEW*
	- rename statusLine_offset() -> statusLineOffset()
2020-02-28 04:53:14 +09:00
SASANO Takayoshi a117d70c56 send CR+LF (command terminator) first at refreshDisplay()
Sometimes BOXF (box fill) command at refreshDisplay() fails.
Normally this is not occured, but running MMDVMHost for long time
(about one day) we see this problem.

The reason is unknown. But if LCD panel receives garbage character between
calling refreshDisplay(), first command (BOXF) at latter-called
refresDdisplay() will fail.

For workaround, send CR+LF command terminator first at this function.
2020-02-24 17:52:30 +09:00
SASANO Takayoshi 60e82737b9 improve refreshing display
Display space character with DCV command to clear screen, but this command is
very slow. I tested filling whole 160x128 area with 8x16 character by DCV16
command, it took 540msec.

This is the worst case, but display refresh period has extended to 600ms
for safety.

To clear screen, use BOXF command instead. And, reduced issuing DCV command.
2020-01-18 06:29:49 +09:00
Jonathan Naylor 3fa72d853d Fix compilation warnings. 2019-12-27 17:26:46 +00:00
Jonathan Naylor 3b7452feda Update for VS2017 2019-12-15 22:20:03 +00:00
SASANO Takayoshi be6f59ba5f fix copyright header
Add coder's name.

This code is forked from TFTSerial.cpp and TFTSerial.h
so original author's credit is kept.
2019-12-09 06:38:21 +09:00
SASANO Takayoshi f3844ceae8 Add Surenoo UART-TFT panel (1.8inch, 128x160) support.
HobbyTronics TFT Shield has discontinued, here is a replacement TFT module
that can be controlled from UART.

Different from TFT Shield, it cannot display figures that stored in
micro SD card. So appearance is simplified like OLED.

Surenoo module sometimes ignores display commands (in busy stuation?),
this driver buffers display status and refresh at clockInt().
2019-12-01 16:33:19 +09:00