diff --git a/CMakeLists.txt b/CMakeLists.txt index 20b30b8..2c9002b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,10 +24,11 @@ add_definitions(-D SIMULATOR) add_definitions(-D SIMULATE_PULSES) add_definitions(-D BATTERY_REMOVABLE) add_definitions(-D KEYBOARD_5KEYS) +# add_definitions(-D DISPLAY_PANEL) add_definitions(-D PULSE_LED) # add_definitions(-D ALERT_LED) add_definitions(-D VIBRATOR) -add_definitions(-D DATA_MODE) +# add_definitions(-D DATA_MODE) add_definitions(-D GAME) add_definitions(-D MCURENDERER_SDL) add_definitions(-D _CRT_SECURE_NO_WARNINGS) diff --git a/RELEASES.md b/RELEASES.md index 5efd989..5ea2082 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3,6 +3,7 @@ ## 2.0rc5 The final countdown * Added Bosean FS-5000 support. +* Added display panels menu for calibrating the display on the GC-01. * Added secondary dose view in average measurement mode. * Extended conversion factor range to 25-1600 cpm/µSv/h. * Added 1 second datalog interval options and removed 30 seconds and 30 minutes datalog interval options. diff --git a/docs/devices/Bosean FS-5000/display.md b/docs/devices/Bosean FS-5000/display.md index a347897..34f3b5c 100644 --- a/docs/devices/Bosean FS-5000/display.md +++ b/docs/devices/Bosean FS-5000/display.md @@ -1,80 +1,43 @@ -# Bosean FS-50000 240x320 LCD display (ST7789V) +# LCD Displays -* 0x11 SLPOUT: Wait 10 ms -* 0x36 MADCTL: 0x00 -* 0x3a COLMOD: 0x55 -* 0xb2 PORCTRL: 0x0c 0x0c 0x00 0x33 0x33 -* 0xb7 GCTRL: 0x35 -* 0xbb VCOMS: 0x28 -* 0xc0 LCMCTRL: 0x2c -* 0xc2 VDVVRHEN: 0x01 -* 0xc3 VRHS: 0x22 -* 0xc4 VDVS: 0x20 -* 0xc6 FRCTRL2: 0x0f -* 0xd0 PWCTRL1: 0xa4 0xa1 -* 0xe0 PVGAMCTRL: 0xd0 0x04 0x10 0x13 0x14 0x2c 0x41 0x54 0x4e 0x18 0x0c 0x0a 0x21 0x25 -* 0xe1 NVGAMCTRL: 0xd0 0x04 0x0f 0x13 0x15 0x2c 0x40 0x44 0x52 0x2d 0x1d 0x1e 0x21 0x24 -* 0x2a CASET: 0x00 0x00 0x00 0xef -* 0x2b RASET: 0x00 0x00 0x01 0x3f +## FPC-H24C159-01W Initialization sequence -## Initialization sequence - -* display_send_command(0x11); // SLPOUT: Sleep out -* sleep(10) -* display_send_command(0x36); // MADCTL: Memory access control -* display_send_data(0x00); -* display_send_command(0x3a); // COLMOD: Interface pixel format -* display_send_data(0x55); // Set: 0x55 (16-bit interface format, 16 bit control format) -* display_send_command(0xb2); // PORCTRL: Porch setting -* display_send_data(0x0c); // Default value -* display_send_data(0x0c); -* display_send_data(0x00); -* display_send_data(0x33); -* display_send_data(0x33); -* display_send_command(0xb7); // GCTRL: Gate control -* display_send_data(0x35); // Default value -* display_send_command(0xbb); // VCOMS: VCOMS setting -* display_send_data(0x28); // Set: 1.1 V (default 0.9 V) -* display_send_command(0xc0); // LCMCTRL: LCM control -* display_send_data(0x2c); // Default value -* display_send_command(0xc2); // VDVVRHEN: VDV and VRH command enable -* display_send_data(0x1); // Default value -* display_send_command(0xc3); // VRHS: VRH set -* display_send_data(0x22); // -5.25+(vcom+vcom offset-vdv) -* display_send_command(0xc4); // VDVS: VDV set -* display_send_data(0x20); // Default value -* display_send_command(0xc6); // FRCTRL2: Frame rate control in normal mode -* display_send_data(0x0f); // Default value -* display_send_command(0xd0); // PWCTRL1: Power control 1 -* display_send_data(0xa4); // Set: AVDD 6.8 V, AVCL -4.8 V, VDDS 2.3 V -* display_send_data(0xa1); -* display_send_command(0xe0); // PVGAMCTRL: Positive voltage gamma control -* display_send_data(0xd0); // Set -* display_send_data(0x04); -* display_send_data(0x10); -* display_send_data(0x13); -* display_send_data(0x14); -* display_send_data(0x2c); -* display_send_data(0x41); -* display_send_data(0x54); -* display_send_data(0x4e); -* display_send_data(0x18); -* display_send_data(0x0c); -* display_send_data(0x0a); -* display_send_data(0x21); -* display_send_data(0x25); -* display_send_command(0xe1); // NVGAMCTRL: Negative voltage gamma control -* display_send_data(0xd0); // Set -* display_send_data(0x04); -* display_send_data(0x0f); -* display_send_data(0x13); -* display_send_data(0x15); -* display_send_data(0x2c); -* display_send_data(0x40); -* display_send_data(0x44); -* display_send_data(0x52); -* display_send_data(0x2d); -* display_send_data(0x1d); -* display_send_data(0x1e); -* display_send_data(0x21); -* display_send_data(0x24); + display_send_command(0x3a); // COLMOD (should be 0x55) + display_send_data(0x06); + display_send_command(0xbb); // VCOMS (default: 0x20) + display_send_data(0x2b); + display_send_command(0xc3); // VRHS (default: 0xb) + display_send_data(0x11); + display_send_command(0xd0); // PWCTRL1 (default: 0xa4, 0x81) + display_send_data(0xa4); + display_send_data(0xa1); + display_send_command(0xe0); // PVGAMCTRL + display_send_data(0xd0); + display_send_data(0x00); + display_send_data(0x05); + display_send_data(0x0e); + display_send_data(0x15); + display_send_data(0x0d); + display_send_data(0x37); + display_send_data(0x43); + display_send_data(0x47); + display_send_data(0x09); + display_send_data(0x15); + display_send_data(0x12); + display_send_data(0x16); + display_send_data(0x19); + display_send_command(0xe1); // NVGAMCTRL + display_send_data(0xd0); + display_send_data(0x00); + display_send_data(0x05); + display_send_data(0x0d); + display_send_data(0x0c); + display_send_data(0x06); + display_send_data(0x2d); + display_send_data(0x44); + display_send_data(0x40); + display_send_data(0x0e); + display_send_data(0x1c); + display_send_data(0x18); + display_send_data(0x16); + display_send_data(0x19); diff --git a/docs/devices/Bosean FS-5000/install.md b/docs/devices/Bosean FS-5000/install.md index 76eadac..2878aad 100644 --- a/docs/devices/Bosean FS-5000/install.md +++ b/docs/devices/Bosean FS-5000/install.md @@ -18,7 +18,7 @@ To start installing Rad Pro, turn off the device, remove the screws holding the The board should look like in the photo above. If it does not, you may have a different hardware revision. In this case, Rad Pro may not function properly. -If your board looks different and Rad Pro does not work, create an issue on https://github.com/Gissio/radpro/issues. +If your board looks different and Rad Pro does not work, create an [issue](https://github.com/Gissio/radpro/issues). ## Step 2: Connect the programmer @@ -49,6 +49,8 @@ The installation will automatically create a backup of the original firmware in Before closing the device, take note of the type of Geiger tube: the markings on the glass should be either J321, J305, M4011 or J614. If you have an unmarked tube measuring 55 or 65 mm long, you probably have a J614 or J613 tube, respectively. +Also take note of the type of LCD display: the marking on the ribbon cable should be “FPC1-H24C159-01W”. If it is not, please create an [issue](https://github.com/Gissio/radpro/issues). + ## Step 4: Configure your device Start your device and go to Rad Pro's settings, select “Geiger tube”, “Conversion factor”, and select the option that matches the Geiger-Müller tube installed in your device. diff --git a/docs/devices/Bosean FS-600, FS-1000/display.md b/docs/devices/Bosean FS-600, FS-1000/display.md index 8e370c2..55c3696 100644 --- a/docs/devices/Bosean FS-600, FS-1000/display.md +++ b/docs/devices/Bosean FS-600, FS-1000/display.md @@ -2,23 +2,23 @@ ## Initialization sequence -* display_clear_en(); -* sleep(20); -* display_set_en(); -* sleep(20); -* display_send_command(0xe2); // Software reset -* display_send_command(0xa4); // Display all points: normal display -* display_send_command(0xe6); // Sets the LCD display normal/reverse: normal -* display_send_command(0xa2); // Set LCD bias: 1/9 bias -* display_send_command(0xf8); // Set internal booster... -* display_send_command(0x00); // ... to 4x -* display_send_command(0xa0); // Set SEG output direction: normal -* display_send_command(0xc8); // COM output scan direction: reverse direction -* display_send_command(0x2c); // Power control: 100, enable internal voltage booster -* display_send_command(0x2e); // Power control: 110, enable internal voltage regulator -* display_send_command(0x2f); // Power control: 111, enable internal voltage follower -* display_send_command(0x24); // Select internal resistor ratio(Rb/Ra) mode (0 to 7) [4] -* display_send_command(0x81); // Set contrast -* display_send_command(0x20); // Set contrast value: 00-3f contrast -* display_send_command(0x40); // Specify DDRAM line x for COM0 [0] -* display_send_command(0xae); // Turn LCD display: off + display_clear_en(); + sleep(20); + display_set_en(); + sleep(20); + display_send_command(0xe2); // Software reset + display_send_command(0xa4); // Display all points: normal display + display_send_command(0xe6); // Sets the LCD display normal/reverse: normal + display_send_command(0xa2); // Set LCD bias: 1/9 bias + display_send_command(0xf8); // Set internal booster... + display_send_command(0x00); // ... to 4x + display_send_command(0xa0); // Set SEG output direction: normal + display_send_command(0xc8); // COM output scan direction: reverse direction + display_send_command(0x2c); // Power control: 100, enable internal voltage booster + display_send_command(0x2e); // Power control: 110, enable internal voltage regulator + display_send_command(0x2f); // Power control: 111, enable internal voltage follower + display_send_command(0x24); // Select internal resistor ratio(Rb/Ra) mode (0 to 7) [4] + display_send_command(0x81); // Set contrast + display_send_command(0x20); // Set contrast value: 00-3f contrast + display_send_command(0x40); // Specify DDRAM line x for COM0 [0] + display_send_command(0xae); // Turn LCD display: off diff --git a/docs/devices/Bosean FS-600, FS-1000/install.md b/docs/devices/Bosean FS-600, FS-1000/install.md index fe146e1..18c11cc 100644 --- a/docs/devices/Bosean FS-600, FS-1000/install.md +++ b/docs/devices/Bosean FS-600, FS-1000/install.md @@ -22,7 +22,7 @@ Follow these steps to start installing Rad Pro: The board should look like in the photo above. If it does not, you may have a different hardware revision. In this case, Rad Pro may not function properly. -If your board looks different and Rad Pro does not work, create an issue on https://github.com/Gissio/radpro/issues. +If your board looks different and Rad Pro does not work, create an [issue](https://github.com/Gissio/radpro/issues). ## Step 2: Connect the programmer diff --git a/docs/devices/FNIRSI GC-01/display.md b/docs/devices/FNIRSI GC-01/display.md index 098ac86..010f80a 100644 --- a/docs/devices/FNIRSI GC-01/display.md +++ b/docs/devices/FNIRSI GC-01/display.md @@ -2,86 +2,86 @@ ## Initialization sequence -* display_set_reset(); -* sleep(10); -* display_clear_reset(); -* sleep(20); -* display_set_reset(); -* sleep(20); + display_set_reset(); + sleep(10); + display_clear_reset(); + sleep(20); + display_set_reset(); + sleep(20); -* display_send_command(0x11); // SLPOUT: Sleep out -* sleep(120) -* display_send_command(0x36); // MADCTL: Memory access control -* display_send_data(0x0); -* display_send_command(0x3a); // COLMOD: Interface pixel format -* display_send_data(0x5); // Set: 0x5 (16 bit/pixel) (should be 0x55) -* display_send_command(0xb2); // PORCTRL: Porch setting -* display_send_data(0xc); // Default value -* display_send_data(0xc); -* display_send_data(0x0); -* display_send_data(0x33); -* display_send_data(0x33); -* display_send_command(0xb7); // GCTRL: Gate control -* display_send_data(0x35); // Default value -* display_send_command(0xbb); // VCOMS: VCOMS setting -* display_send_data(0x28); // Set: 1.1 V (default 0.9 V) -* display_send_command(0xc0); // LCMCTRL: LCM control -* display_send_data(0x2c); // Default value -* display_send_command(0xc2); // VDVVRHEN: VDV and VRH command enable -* display_send_data(0x1); // Default value -* display_send_command(0xc3); // VRHS: VRH set -* display_send_data(0xb); // Default value -* display_send_command(0xc4); // VDVS: VDV set -* display_send_data(0x20); // Default value -* display_send_command(0xc6); // FRCTRL2: Frame rate control in normal mode -* display_send_data(0xf); // Default value -* display_send_command(0xd0); // PWCTRL1: Power control 1 -* display_send_data(0xa4); // Set: AVDD 6.8 V, AVCL -4.8 V, VDDS 2.3 V -* display_send_data(0xa1); -* display_send_command(0xe0); // PVGAMCTRL: Positive voltage gamma control -* display_send_data(0xd0); // Set -* display_send_data(0x1); -* display_send_data(0x8); -* display_send_data(0xf); -* display_send_data(0x11); -* display_send_data(0x2a); -* display_send_data(0x36); -* display_send_data(0x55); -* display_send_data(0x44); -* display_send_data(0x3a); -* display_send_data(0xb); -* display_send_data(0x6); -* display_send_data(0x11); -* display_send_data(0x20); -* display_send_command(0xe1); // NVGAMCTRL: Negative voltage gamma control -* display_send_data(0xd0); // Set -* display_send_data(0x2); -* display_send_data(0x7); -* display_send_data(0xa); -* display_send_data(0xb); -* display_send_data(0x18); -* display_send_data(0x34); -* display_send_data(0x43); -* display_send_data(0x4a); -* display_send_data(0x2b); -* display_send_data(0x1b); -* display_send_data(0x1c); -* display_send_data(0x22); -* display_send_data(0x1f); -* display_send_command(0x29); // DISPON: Display on -* display_send_command(0x2c); // RAMWR: Memory write + display_send_command(0x11); // SLPOUT: Sleep out + sleep(120) + display_send_command(0x36); // MADCTL: Memory access control + display_send_data(0x0); + display_send_command(0x3a); // COLMOD: Interface pixel format + display_send_data(0x5); // Set: 0x5 (16 bit/pixel) (should be 0x55) + display_send_command(0xb2); // PORCTRL: Porch setting + display_send_data(0xc); // Default value + display_send_data(0xc); + display_send_data(0x0); + display_send_data(0x33); + display_send_data(0x33); + display_send_command(0xb7); // GCTRL: Gate control + display_send_data(0x35); // Default value + display_send_command(0xbb); // VCOMS: VCOMS setting + display_send_data(0x28); // Set: 1.1 V (default 0.9 V) + display_send_command(0xc0); // LCMCTRL: LCM control + display_send_data(0x2c); // Default value + display_send_command(0xc2); // VDVVRHEN: VDV and VRH command enable + display_send_data(0x1); // Default value + display_send_command(0xc3); // VRHS: VRH set + display_send_data(0xb); // Default value + display_send_command(0xc4); // VDVS: VDV set + display_send_data(0x20); // Default value + display_send_command(0xc6); // FRCTRL2: Frame rate control in normal mode + display_send_data(0xf); // Default value + display_send_command(0xd0); // PWCTRL1: Power control 1 + display_send_data(0xa4); // Set: AVDD 6.8 V, AVCL -4.8 V, VDDS 2.3 V + display_send_data(0xa1); + display_send_command(0xe0); // PVGAMCTRL: Positive voltage gamma control + display_send_data(0xd0); // Set + display_send_data(0x1); + display_send_data(0x8); + display_send_data(0xf); + display_send_data(0x11); + display_send_data(0x2a); + display_send_data(0x36); + display_send_data(0x55); + display_send_data(0x44); + display_send_data(0x3a); + display_send_data(0xb); + display_send_data(0x6); + display_send_data(0x11); + display_send_data(0x20); + display_send_command(0xe1); // NVGAMCTRL: Negative voltage gamma control + display_send_data(0xd0); // Set + display_send_data(0x2); + display_send_data(0x7); + display_send_data(0xa); + display_send_data(0xb); + display_send_data(0x18); + display_send_data(0x34); + display_send_data(0x43); + display_send_data(0x4a); + display_send_data(0x2b); + display_send_data(0x1b); + display_send_data(0x1c); + display_send_data(0x22); + display_send_data(0x1f); + display_send_command(0x29); // DISPON: Display on + display_send_command(0x2c); // RAMWR: Memory write ## Data write -* display_send_command(0x36); // MADCTL: Memory access control -* display_send_data(0xa0); -* display_send_command(0x2a); // CASET: Column address set -* display_send_data(0x0); // Default (start, end) -* display_send_data(0x0); -* display_send_data(0x1); -* display_send_data(0x3f); -* display_send_command(0x2b); // RASET: Row address set -* display_send_data(0x0); // Default (start, end) -* display_send_data(0x0); -* display_send_data(0x0); -* display_send_data(0xef); + display_send_command(0x36); // MADCTL: Memory access control + display_send_data(0xa0); + display_send_command(0x2a); // CASET: Column address set + display_send_data(0x0); // Default (start, end) + display_send_data(0x0); + display_send_data(0x1); + display_send_data(0x3f); + display_send_command(0x2b); // RASET: Row address set + display_send_data(0x0); // Default (start, end) + display_send_data(0x0); + display_send_data(0x0); + display_send_data(0xef); diff --git a/docs/devices/FNIRSI GC-01/install-stlink.md b/docs/devices/FNIRSI GC-01/install-stlink.md index bb99150..48abe73 100644 --- a/docs/devices/FNIRSI GC-01/install-stlink.md +++ b/docs/devices/FNIRSI GC-01/install-stlink.md @@ -28,7 +28,8 @@ Follow these steps to start installing Rad Pro: * Remove the screws holding the back case and open the device. * Disconnect the large battery. * Take note of the MCU (microprocessor) installed in your device: CH32F103R8T6 (WCH) or APM32F103RBT6 (Geehy). The picture above should help you identify the MCU. -* Also, take note of the type of Geiger tube: the markings on the glass should be either J321 (as in the picture above), J305, M4011 or J614. If you have an unmarked tube measuring 55 or 65 mm long, you probably have a J614 or J613 tube, respectively. +* Take note of the type of Geiger tube: the markings on the glass should be either J321 (as in the picture above), J305, M4011 or J614. If you have an unmarked tube measuring 55 or 65 mm long, you probably have a J614 or J613 tube, respectively. +* Also, take note of the type of LCD display: the marking on the ribbon cable should be “CL24CG1045-40B”, “ENH-TV0240b026” or “GMT024-05 V2.0”. If it does not match any of these, please create an [issue](https://github.com/Gissio/radpro/issues). The board should look like in the photo above. If it does not, you may have a different hardware revision. In this case, Rad Pro may not function properly. diff --git a/docs/devices/FNIRSI GC-01/install.md b/docs/devices/FNIRSI GC-01/install.md index ac01e2a..3a82bf6 100644 --- a/docs/devices/FNIRSI GC-01/install.md +++ b/docs/devices/FNIRSI GC-01/install.md @@ -9,7 +9,9 @@ Follow these steps to start installing Rad Pro on your FNIRSI GC-01: * Turn off the device. * Remove the screws holding the back case and open the device. * Take note of the MCU (microprocessor) installed in your device: CH32F103R8T6 (WCH) or APM32F103RBT6 (Geehy). The picture above should help you identify the MCU. **WARNING:** Rad Pro does not work on devices with a CACHIP microprocessor. -* Also, take note of the type of Geiger tube: the markings on the glass should be either J321 (as in the picture above), J305, M4011 or J614. If you have an unmarked tube measuring 55 or 65 mm long, you probably have a J614 or J613 tube, respectively. +* Take note of the type of Geiger tube: the markings on the glass should be either J321 (as in the picture above), J305, M4011 or J614. If you have an unmarked tube measuring 55 or 65 mm long, you probably have a J614 or J613 tube, respectively. +* Also, take note of the type of LCD display: the marking on the ribbon cable should be “CL24CG1045-40B”, “ENH-TV0240b026” or “GMT024-05 V2.0”. If it does not match any of these, please create an [issue](https://github.com/Gissio/radpro/issues). + * Close the device. ## Step 2: Flash the firmware @@ -36,6 +38,8 @@ Go to Rad Pro's settings, select “Geiger tube”, “Conversion factor”, and Within the “Geiger tube” settings, select “HV Profile” and choose an appropriate HV profile: “Energy-saving” is best for measuring background levels of radiation; if the previous profile does not produce any clicks, select “Energy-saving alt.” - **WARNING:** do not use “Energy-saving alt.” if “Energy-saving” works; “Factory default” is the profile from the original firmware and consumes considerably more power. +Also, go to the “Display” settings, select “Type” and choose the type that matches the marking on the display's ribbon cable. + If your device produces spontaneous key presses by itself, select the “Energy-saving” HV profile to fix this problem. Last, read the [user's manual](../../users.md) for learning how to use Rad Pro. diff --git a/docs/devices/FS2011/display.md b/docs/devices/FS2011/display.md index ed02fd6..389505a 100644 --- a/docs/devices/FS2011/display.md +++ b/docs/devices/FS2011/display.md @@ -2,21 +2,21 @@ ## Initialization sequence -* display_send_command(0xe2); // Software reset -* display_send_command(0xae); // Turn LCD display: off -* display_send_command(0x40); // Specify DDRAM line x for COM0 [0] -* display_send_command(0xa0); // Set SEG output direction: normal -* display_send_command(0xc8); // COM output scan direction: reverse direction -* display_send_command(0xa6); // Sets the LCD display normal/reverse: normal -* display_send_command(0xa2); // Set LCD bias: 1/9 bias -* display_send_command(0x2c); // Power control: 100, enable internal voltage booster -* sleep(50); -* display_send_command(0x2e); // Power control: 110, enable internal voltage regulator -* sleep(50); -* display_send_command(0x2f); // Power control: 111, enable internal voltage follower -* sleep(50); -* display_send_command(0x23); // Select internal resistor ratio(Rb/Ra) mode (0 to 7) [3] -* display_send_command(0x81); // Set contrast... -* display_send_command(0x24); // ... to yy [0x24] -* display_send_command(0xae); // Turn LCD display: off -* display_send_command(0xa5); // Display all points: all points on + display_send_command(0xe2); // Software reset + display_send_command(0xae); // Turn LCD display: off + display_send_command(0x40); // Specify DDRAM line x for COM0 [0] + display_send_command(0xa0); // Set SEG output direction: normal + display_send_command(0xc8); // COM output scan direction: reverse direction + display_send_command(0xa6); // Sets the LCD display normal/reverse: normal + display_send_command(0xa2); // Set LCD bias: 1/9 bias + display_send_command(0x2c); // Power control: 100, enable internal voltage booster + sleep(50); + display_send_command(0x2e); // Power control: 110, enable internal voltage regulator + sleep(50); + display_send_command(0x2f); // Power control: 111, enable internal voltage follower + sleep(50); + display_send_command(0x23); // Select internal resistor ratio(Rb/Ra) mode (0 to 7) [3] + display_send_command(0x81); // Set contrast... + display_send_command(0x24); // ... to yy [0x24] + display_send_command(0xae); // Turn LCD display: off + display_send_command(0xa5); // Display all points: all points on diff --git a/docs/devices/FS2011/install.md b/docs/devices/FS2011/install.md index 4a847d4..55f4c93 100644 --- a/docs/devices/FS2011/install.md +++ b/docs/devices/FS2011/install.md @@ -22,7 +22,7 @@ Follow these steps to start installing Rad Pro: The board should look like in the photos above (the tube may be different). If it does not, you may have a different hardware revision. In this case, Rad Pro may not function properly. -If your board looks different and Rad Pro does not work, create an issue on https://github.com/Gissio/radpro/issues. +If your board looks different and Rad Pro does not work, create an [issue](https://github.com/Gissio/radpro/issues). ## Step 2: Connect the programmer diff --git a/docs/install-other.md b/docs/install-other.md index fd43c8e..cab7290 100644 --- a/docs/install-other.md +++ b/docs/install-other.md @@ -1,3 +1,3 @@ # Installing on other devices -If you would like to contribute to this project and add support for other devices, create a new issue. +If you would like to contribute to this project and add support for other devices, please create an [issue](https://github.com/Gissio/radpro/issues). diff --git a/platform.io/platformio.ini b/platform.io/platformio.ini index 67eec56..b5cb51a 100644 --- a/platform.io/platformio.ini +++ b/platform.io/platformio.ini @@ -137,6 +137,7 @@ build_flags = -D KEYBOARD_5KEYS -D DISPLAY_320X240 -D DISPLAY_COLOR + -D DISPLAY_PANEL -D FONT_2BPP -D FONT_SYMBOLS_LIM -D PULSE_LED @@ -160,6 +161,7 @@ build_flags = -D KEYBOARD_5KEYS -D DISPLAY_320X240 -D DISPLAY_COLOR + -D DISPLAY_PANEL -D FONT_2BPP -D FONT_SYMBOLS_LIM -D PULSE_LED @@ -184,6 +186,7 @@ build_flags = -D KEYBOARD_5KEYS -D DISPLAY_320X240 -D DISPLAY_COLOR + -D DISPLAY_PANEL -D FONT_SYMBOLS_LIM -D PULSE_LED -D VIBRATOR diff --git a/platform.io/src/display.c b/platform.io/src/display.c index f198cda..746bd56 100644 --- a/platform.io/src/display.c +++ b/platform.io/src/display.c @@ -2216,19 +2216,24 @@ void drawGame(const uint8_t board[8][8], // Display menu -const View displayContrastMenuView; const View displayThemeMenuView; +const View displayContrastMenuView; const View displayBrightnessMenuView; const View displaySleepMenuView; +const View displayPanelMenuView; static const OptionView displayMenuOptions[] = { -#if defined(DISPLAY_MONOCHROME) - {"Contrast", &displayContrastMenuView}, -#elif defined(DISPLAY_COLOR) +#if defined(DISPLAY_COLOR) {"Theme", &displayThemeMenuView}, #endif {"Brightness", &displayBrightnessMenuView}, +#if defined(DISPLAY_MONOCHROME) + {"Contrast", &displayContrastMenuView}, +#endif {"Sleep", &displaySleepMenuView}, +#if defined(DISPLAY_PANEL) + {"Panel", &displayPanelMenuView}, +#endif {NULL}, }; @@ -2246,7 +2251,7 @@ static void onDisplayMenuSelect(const Menu *menu) setView(displayMenuOptions[menu->state->selectedIndex].view); } -static void onDisplaySubMenuBack(const Menu *menu) +void onDisplaySubMenuBack(const Menu *menu) { setView(&displayMenuView); } @@ -2440,6 +2445,56 @@ const View displaySleepMenuView = { &displaySleepMenu, }; +// Display panel menu + +#if defined(DISPLAY_PANEL) + +static const char *const displayPanelMenuOptions[] = { +#if defined(DISPLAY_PANEL_1) + DISPLAY_PANEL_1, +#endif +#if defined(DISPLAY_PANEL_2) + DISPLAY_PANEL_2, +#endif +#if defined(DISPLAY_PANEL_3) + DISPLAY_PANEL_3, +#endif + NULL, +}; + +static const char *onDisplayPanelMenuGetOption(const Menu *menu, + uint32_t index, + MenuStyle *menuStyle) +{ + *menuStyle = (index == settings.displayPanel); + + return displayPanelMenuOptions[index]; +} + +static void onDisplayPanelMenuSelect(const Menu *menu) +{ + settings.displayPanel = menu->state->selectedIndex; + + updateDisplayPanel(); +} + +static MenuState displayPanelMenuState; + +static const Menu displayPanelMenu = { + "Panel", + &displayPanelMenuState, + onDisplayPanelMenuGetOption, + onDisplayPanelMenuSelect, + onDisplaySubMenuBack, +}; + +const View displayPanelMenuView = { + onMenuEvent, + &displayPanelMenu, +}; + +#endif + // Display flashes menu static const char *const displayFlashesMenuOptions[] = { diff --git a/platform.io/src/display.h b/platform.io/src/display.h index 4a15bec..a6c8e7a 100644 --- a/platform.io/src/display.h +++ b/platform.io/src/display.h @@ -59,13 +59,19 @@ void initDisplay(void); void initDisplayController(void); void initDisplayBacklight(void); +void updateDisplayPanel(void); + void setDisplayOn(bool value); bool isDisplayOn(void); + void setDisplaySleep(bool value); bool isDisplaySleep(void); + void setDisplayBacklightOn(bool value); bool isDisplayBacklightOn(void); + void updateDisplayContrast(void); + void refreshDisplay(void); void drawTitleBar(const char *title); diff --git a/platform.io/src/events.c b/platform.io/src/events.c index dfcc375..ba9fabd 100644 --- a/platform.io/src/events.c +++ b/platform.io/src/events.c @@ -371,7 +371,7 @@ void triggerDisplay(void) bool isDisplayTimerActive(void) { - return events.displayTimer > PULSE_FLASH_TICKS; + return events.displayTimer > ALARM_FLASH_TICKS; } void setPulseThresholding(bool value) diff --git a/platform.io/src/keyboard.c b/platform.io/src/keyboard.c index cae6346..19e94fc 100644 --- a/platform.io/src/keyboard.c +++ b/platform.io/src/keyboard.c @@ -12,6 +12,7 @@ #include "cmath.h" #include "events.h" #include "keyboard.h" +#include "settings.h" #if defined(KEYBOARD_2KEYS) || defined(KEYBOARD_3KEYS) #define KEY_PRESSED_LONG ((uint32_t)(0.25 * SYSTICK_FREQUENCY / KEY_TICKS)) @@ -34,6 +35,8 @@ static struct Key pressedKey; uint32_t pressedTicks; + bool isBacklightDown; + KeyboardMode mode; volatile uint32_t eventQueueHead; @@ -66,22 +69,32 @@ void onKeyboardTick(void) bool isKeyDown[KEY_NUM]; getKeyboardState(isKeyDown); + bool isBacklightPressed = false; + bool isBacklightReleased = false; + for (int32_t i = 0; i < KEY_NUM; i++) { // Key down if (!keyboard.wasKeyDown[i] && isKeyDown[i]) { +#if defined(DISPLAY_MONOCHROME) + if ((settings.displaySleep != DISPLAY_SLEEP_ALWAYS_OFF) && + !isDisplayTimerActive()) +#elif defined(DISPLAY_COLOR) + if (!isDisplayTimerActive()) +#endif + isBacklightPressed = true; + #if defined(KEYBOARD_5KEYS) - if (keyboard.mode == KEYBOARD_MODE_MEASUREMENT) - { - if ((i != KEY_LEFT) && - (i != KEY_OK)) - event = i; - } - else + if (i != KEY_OK) { - if (i != KEY_OK) + if (keyboard.mode == KEYBOARD_MODE_MEASUREMENT) + { + if (i != KEY_LEFT) + event = i; + } + else event = i; } #endif @@ -95,6 +108,8 @@ void onKeyboardTick(void) !isKeyDown[i] && (i == keyboard.pressedKey)) { + isBacklightReleased = true; + #if defined(KEYBOARD_2KEYS) if (keyboard.mode == KEYBOARD_MODE_MEASUREMENT) { @@ -279,11 +294,25 @@ void onKeyboardTick(void) } // Enqueue event - if (event != EVENT_NONE) + bool ignoreEvent = keyboard.isBacklightDown && + (event != EVENT_KEY_POWER) && + (event != EVENT_KEY_BACKLIGHT); + + if (isBacklightPressed) { - keyboard.eventQueue[keyboard.eventQueueHead] = event; - keyboard.eventQueueHead = (keyboard.eventQueueHead + 1) & EVENT_QUEUE_MASK; + event = EVENT_KEY_BACKLIGHT; + keyboard.isBacklightDown = true; } + + if (isBacklightReleased) + keyboard.isBacklightDown = false; + + if ((event == EVENT_NONE) || + ignoreEvent) + return; + + keyboard.eventQueue[keyboard.eventQueueHead] = event; + keyboard.eventQueueHead = (keyboard.eventQueueHead + 1) & EVENT_QUEUE_MASK; } void setKeyboardMode(KeyboardMode mode) diff --git a/platform.io/src/sdl/sdlsim_display.c b/platform.io/src/sdl/sdlsim_display.c index cafaa9f..954742c 100644 --- a/platform.io/src/sdl/sdlsim_display.c +++ b/platform.io/src/sdl/sdlsim_display.c @@ -53,6 +53,10 @@ void initDisplayController(void) #endif } +void updateDisplayPanel(void) +{ +} + void setDisplayOn(bool value) { displayOn = value; diff --git a/platform.io/src/settings.h b/platform.io/src/settings.h index f1ab4fe..69a354b 100644 --- a/platform.io/src/settings.h +++ b/platform.io/src/settings.h @@ -279,6 +279,12 @@ enum DISPLAY_BRIGHTNESS_NUM, }; +#if defined(GC01) || defined(SIMULATOR) +#define DISPLAY_PANEL_1 "CL24CG1045-40B" +#define DISPLAY_PANEL_2 "ENH-TV0240B026" +#define DISPLAY_PANEL_3 "GMT024-05 V2.0" +#endif + enum { RTC_TIMEZONE_M1200, @@ -392,6 +398,9 @@ typedef struct #endif unsigned int displayBrightness : 2; unsigned int displaySleep : 3; +#if defined(DISPLAY_PANEL) + unsigned int displayPanel : 2; +#endif unsigned int rtcTimeZone : 5; unsigned int rtcTimeFormat : 1; diff --git a/platform.io/src/stm32/fs5000.c b/platform.io/src/stm32/fs5000.c index 79f289d..cbbf20a 100644 --- a/platform.io/src/stm32/fs5000.c +++ b/platform.io/src/stm32/fs5000.c @@ -122,16 +122,16 @@ bool displayOn; static uint8_t displayTextbuffer[86 * 86]; static const uint8_t displayInitSequence[] = { + MR_SEND_COMMAND(MR_ST7789_RAMCTRL), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0xe0), MR_SEND_COMMAND(MR_ST7789_VCOMS), MR_SEND_DATA(0x2b), // Set: 1.175 V (default 0.9 V) MR_SEND_COMMAND(MR_ST7789_VRHS), - MR_SEND_DATA(0x11), // Set: -4.4 V (default -4.1 V) + MR_SEND_DATA(0x11), // Set: 4.4 V (default 4.1 V) MR_SEND_COMMAND(MR_ST7789_PWCTRL1), MR_SEND_DATA(0xa4), // Set: AVDD 6.8 V, AVCL -4.8 V, VDDS 2.3 V MR_SEND_DATA(0xa1), - MR_SEND_COMMAND(MR_ST7789_RAMCTRL), - MR_SEND_DATA(0x00), - MR_SEND_DATA(0xe0), MR_SEND_COMMAND(MR_ST7789_PVGAMCTRL), MR_SEND_DATA(0xd0), MR_SEND_DATA(0x00), @@ -162,7 +162,6 @@ static const uint8_t displayInitSequence[] = { MR_SEND_DATA(0x18), MR_SEND_DATA(0x16), MR_SEND_DATA(0x19), - MR_END(), }; diff --git a/platform.io/src/stm32/gc01.c b/platform.io/src/stm32/gc01.c index 5a2f333..2266bdf 100644 --- a/platform.io/src/stm32/gc01.c +++ b/platform.io/src/stm32/gc01.c @@ -139,15 +139,27 @@ bool displayOn; static uint8_t displayTextbuffer[86 * 86]; -static const uint8_t displayInitSequence[] = { - MR_SEND_COMMAND(MR_ST7789_VCOMS), - MR_SEND_DATA(0x28), // Set: 1.1 V (default 0.9 V) - MR_SEND_COMMAND(MR_ST7789_PWCTRL1), - MR_SEND_DATA(0xa4), // Set: AVDD 6.8 V, AVCL -4.8 V, VDDS 2.3 V - MR_SEND_DATA(0xa1), +static const uint8_t displayCL24CG104540BInitSequence[] = { MR_SEND_COMMAND(MR_ST7789_RAMCTRL), MR_SEND_DATA(0x00), MR_SEND_DATA(0xe0), + MR_SEND_COMMAND(MR_ST7789_PORCTRL), + MR_SEND_DATA(0x0c), + MR_SEND_DATA(0x0c), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0x33), + MR_SEND_DATA(0x33), + MR_SEND_COMMAND(MR_ST7789_GCTRL), + MR_SEND_DATA(0x35), // VGLS=-10.43 V, VGHS=13.26 V + MR_SEND_COMMAND(MR_ST7789_VCOMS), + MR_SEND_DATA(0x28), // VCOM=1.1 V + MR_SEND_COMMAND(MR_ST7789_VRHS), + MR_SEND_DATA(0x0b), // VRH=4.1 V + MR_SEND_COMMAND(MR_ST7789_FRCTRL2), + MR_SEND_DATA(0x0f), // 60 Hz + MR_SEND_COMMAND(MR_ST7789_PWCTRL1), + MR_SEND_DATA(0xa4), // AVDD=6.8 V, AVCL=-4.8 V, VDDS=2.3 V + MR_SEND_DATA(0xa1), MR_SEND_COMMAND(MR_ST7789_PVGAMCTRL), MR_SEND_DATA(0xd0), MR_SEND_DATA(0x01), @@ -178,13 +190,171 @@ static const uint8_t displayInitSequence[] = { MR_SEND_DATA(0x1c), MR_SEND_DATA(0x22), MR_SEND_DATA(0x1f), + MR_SEND_COMMAND(MR_ST7789_PWCTRL2), + MR_SEND_DATA(0x93), // SBCLK DIV 3, BCLK DIV 6 + MR_SEND_COMMAND(MR_ST7789_EQCTRL), + MR_SEND_DATA(0x11), // SEQ=6.8 µs + MR_SEND_DATA(0x11), // SPRET=6.8 µs + MR_SEND_DATA(0x08), // GEQ=3.2 µs + MR_END(), +}; + +static const uint8_t displayENHTV0240B026InitSequence[] = { + MR_SEND_COMMAND(MR_ST7789_RAMCTRL), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0xe0), + MR_SEND_COMMAND(MR_ST7789_PORCTRL), + MR_SEND_DATA(0x0c), + MR_SEND_DATA(0x0c), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0x33), + MR_SEND_DATA(0x33), + MR_SEND_COMMAND(MR_ST7789_GCTRL), + MR_SEND_DATA(0x35), // VGLS=-10.43 V, VGHS=13.26 V + MR_SEND_COMMAND(MR_ST7789_VCOMS), + MR_SEND_DATA(0x36), // VCOM=1.45 V + MR_SEND_COMMAND(MR_ST7789_VRHS), + MR_SEND_DATA(0x12), // VRH=4.45 V + MR_SEND_COMMAND(MR_ST7789_FRCTRL2), + MR_SEND_DATA(0x0f), // 60 Hz + MR_SEND_COMMAND(MR_ST7789_PWCTRL1), + MR_SEND_DATA(0xa4), // AVDD=6.8 V, AVCL=-4.8 V, VDDS=2.3 V + MR_SEND_DATA(0xa1), + MR_SEND_COMMAND(MR_ST7789_PVGAMCTRL), + MR_SEND_DATA(0xd0), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0x05), + MR_SEND_DATA(0x0e), + MR_SEND_DATA(0x15), + MR_SEND_DATA(0x0d), + MR_SEND_DATA(0x37), + MR_SEND_DATA(0x43), + MR_SEND_DATA(0x47), + MR_SEND_DATA(0x09), + MR_SEND_DATA(0x15), + MR_SEND_DATA(0x12), + MR_SEND_DATA(0x16), + MR_SEND_DATA(0x19), + MR_SEND_COMMAND(MR_ST7789_NVGAMCTRL), + MR_SEND_DATA(0xd0), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0x05), + MR_SEND_DATA(0x0d), + MR_SEND_DATA(0x0c), + MR_SEND_DATA(0x06), + MR_SEND_DATA(0x2d), + MR_SEND_DATA(0x44), + MR_SEND_DATA(0x40), + MR_SEND_DATA(0x0e), + MR_SEND_DATA(0x1c), + MR_SEND_DATA(0x18), + MR_SEND_DATA(0x16), + MR_SEND_DATA(0x19), + MR_SEND_COMMAND(MR_ST7789_PWCTRL2), + MR_SEND_DATA(0x93), // SBCLK DIV 3, BCLK DIV 6 + MR_SEND_COMMAND(MR_ST7789_EQCTRL), + MR_SEND_DATA(0x11), // SEQ=6.8 µs + MR_SEND_DATA(0x11), // SPRET=6.8 µs + MR_SEND_DATA(0x08), // GEQ=3.2 µs + MR_END(), +}; + +static const uint8_t displayGMT02405V20InitSequence[] = { + MR_SEND_COMMAND(MR_ST7789_RAMCTRL), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0xe0), + MR_SEND_COMMAND(MR_ST7789_PORCTRL), + MR_SEND_DATA(0x05), + MR_SEND_DATA(0x05), + MR_SEND_DATA(0x00), + MR_SEND_DATA(0x33), + MR_SEND_DATA(0x33), + MR_SEND_COMMAND(MR_ST7789_GCTRL), + MR_SEND_DATA(0x05), // VGLS=-10.43 V, VGHS=12.2 V + MR_SEND_COMMAND(MR_ST7789_VCOMS), + MR_SEND_DATA(0x39), // VCOM=1.525 V + MR_SEND_COMMAND(MR_ST7789_VRHS), + MR_SEND_DATA(0x0f), // VRH=4.3 V + MR_SEND_COMMAND(MR_ST7789_FRCTRL2), + MR_SEND_DATA(0x01), // 111 Hz + MR_SEND_COMMAND(MR_ST7789_PWCTRL1), + MR_SEND_DATA(0xa4), // AVDD=6.8 V, AVCL=-4.8 V, VDDS=2.3 V + MR_SEND_DATA(0xa1), + MR_SEND_COMMAND(MR_ST7789_PVGAMCTRL), + MR_SEND_DATA(0xd0), + MR_SEND_DATA(0x05), + MR_SEND_DATA(0x09), + MR_SEND_DATA(0x09), + MR_SEND_DATA(0x08), + MR_SEND_DATA(0x14), + MR_SEND_DATA(0x28), + MR_SEND_DATA(0x33), + MR_SEND_DATA(0x3f), + MR_SEND_DATA(0x07), + MR_SEND_DATA(0x13), + MR_SEND_DATA(0x14), + MR_SEND_DATA(0x28), + MR_SEND_DATA(0x30), + MR_SEND_COMMAND(MR_ST7789_NVGAMCTRL), + MR_SEND_DATA(0xd0), + MR_SEND_DATA(0x05), + MR_SEND_DATA(0x09), + MR_SEND_DATA(0x09), + MR_SEND_DATA(0x08), + MR_SEND_DATA(0x03), + MR_SEND_DATA(0x24), + MR_SEND_DATA(0x32), + MR_SEND_DATA(0x32), + MR_SEND_DATA(0x3B), + MR_SEND_DATA(0x14), + MR_SEND_DATA(0x13), + MR_SEND_DATA(0x28), + MR_SEND_DATA(0x2f), + MR_SEND_COMMAND(MR_ST7789_PWCTRL2), + MR_SEND_DATA(0x03), // SBCLK DIV 2, BCLK DIV 6 + MR_SEND_COMMAND(MR_ST7789_EQCTRL), + MR_SEND_DATA(0x09), // SEQ=3.6 µs + MR_SEND_DATA(0x09), // SPRET=3.6 µs + MR_SEND_DATA(0x08), // GEQ=3.2 µs + MR_END(), +}; #if defined(GC01_DISPLAY_SPI) +static const uint8_t displayIPSInitSequence[] = { MR_SEND_COMMAND(MR_ST7789_INVON), // Inverse for IPS displays -#endif MR_END(), }; +#endif + +void updateDisplayPanel(void) +{ + switch (settings.displayPanel) + { + case 0: + mr_send_sequence(&mr, + displayCL24CG104540BInitSequence); + + break; + + case 1: + mr_send_sequence(&mr, + displayENHTV0240B026InitSequence); + + break; + + case 2: + mr_send_sequence(&mr, + displayGMT02405V20InitSequence); + + break; + } + +#if defined(GC01_DISPLAY_SPI) + mr_send_sequence(&mr, + displayIPSInitSequence); +#endif +} static void onDisplaySleep(uint32_t value) { @@ -350,8 +520,7 @@ void initDisplayController(void) onDisplaySend); #endif - mr_send_sequence(&mr, - displayInitSequence); + updateDisplayPanel(); } void setDisplayOn(bool value) diff --git a/platform.io/src/stm32/gc01.h b/platform.io/src/stm32/gc01.h index d15b80d..d8d613a 100644 --- a/platform.io/src/stm32/gc01.h +++ b/platform.io/src/stm32/gc01.h @@ -23,7 +23,7 @@ #define FIRMWARE_SIZE 0xa000 #elif defined(APM32) #define FLASH_SIZE 0x20000 -#define FIRMWARE_SIZE 0xc000 +#define FIRMWARE_SIZE 0xc800 #endif #define PWR_EN_PORT GPIOA diff --git a/platform.io/src/stm32/stm32_events.c b/platform.io/src/stm32/stm32_events.c index 7a1b5ed..55d0b76 100644 --- a/platform.io/src/stm32/stm32_events.c +++ b/platform.io/src/stm32/stm32_events.c @@ -21,9 +21,9 @@ float timerCountToSeconds = (1.0F / PULSE_MEASUREMENT_FREQUENCY); void initEventsController(void) { + NVIC_SetPriority(SysTick_IRQn, 0xc0); SysTick->LOAD = AHB_FREQUENCY / SYSTICK_FREQUENCY - 1; SysTick->VAL = 0; - NVIC_SetPriority(SysTick_IRQn, 0xc0); SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk; @@ -31,12 +31,12 @@ void initEventsController(void) wait_until_bits_clear(IWDG->SR, IWDG_SR_PVU); iwdg_unlock(); IWDG->PR = 1; + wait_until_bits_clear(IWDG->SR, IWDG_SR_RVU); iwdg_unlock(); IWDG->RLR = 1000 * LSI_FREQUENCY - 1; - // +++ TEST - // iwdg_start(); - // +++ TEST + + iwdg_start(); } void SysTick_Handler(void) diff --git a/platform.io/src/system.h b/platform.io/src/system.h index 23357f0..23e634f 100644 --- a/platform.io/src/system.h +++ b/platform.io/src/system.h @@ -16,7 +16,7 @@ #define FIRMWARE_AUTHOR "Gissio" #define FIRMWARE_NAME "Rad Pro" -#define FIRMWARE_VERSION "2.0rc5-test14" +#define FIRMWARE_VERSION "2.0rc5" extern const View statisticsView; diff --git a/platform.io/src/view.c b/platform.io/src/view.c index 973a42f..1862fcf 100644 --- a/platform.io/src/view.c +++ b/platform.io/src/view.c @@ -10,7 +10,6 @@ #include "display.h" #include "events.h" #include "keyboard.h" -#include "game.h" #include "power.h" #include "settings.h" #include "view.h" @@ -34,31 +33,21 @@ void dispatchViewEvents(void) while (true) { Event event = getKeyboardEvent(); + if (event == EVENT_NONE) break; - -#if defined(DISPLAY_MONOCHROME) - if ((settings.displaySleep == DISPLAY_SLEEP_ALWAYS_OFF) || - displayTimerActive) -#elif defined(DISPLAY_COLOR) - if (displayTimerActive) -#endif + else if (event == EVENT_KEY_POWER) + requestPowerOff(); + else { - if (event == EVENT_KEY_POWER) - requestPowerOff(); - else - { - triggerDisplay(); - - view.currentView->onEvent(view.currentView, event); - } - } - else + view.currentView->onEvent(view.currentView, event); + triggerDisplay(); + } } #if defined(DISPLAY_COLOR) - // Pre-draw operations + // Pre-draw if (isDisplayBacklightOn()) { if (!isDisplayOn()) @@ -87,7 +76,7 @@ void dispatchViewEvents(void) } #if defined(DISPLAY_COLOR) - // Post-draw operations + // Post-draw if (isDisplayBacklightOn()) { if (!isDisplayOn()) diff --git a/tools/radpro-sign.py b/tools/radpro-sign.py index cd51a9d..cdb3ee5 100644 --- a/tools/radpro-sign.py +++ b/tools/radpro-sign.py @@ -113,4 +113,4 @@ def sign_firmware(env_name, container_offset, container_size, flash_size): sign_firmware('bosean-fs1000', 0x0, 0x9000, 0x20000) sign_firmware('bosean-fs5000', 0x0, 0xc000, 0x40000) sign_firmware('fnirsi-gc01-ch32f103r8', 0x4000, 0xa000, 0x10000) -sign_firmware('fnirsi-gc01-apm32f103rb', 0x4000, 0xc000, 0x20000) +sign_firmware('fnirsi-gc01-apm32f103rb', 0x4000, 0xc800, 0x20000)