Merge pull request #800 from geeksville/pinelora

Pinelora
1.2-legacy
Kevin Hester 2021-05-11 10:59:04 +08:00 zatwierdzone przez GitHub
commit e582615eda
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
8 zmienionych plików z 61 dodań i 24 usunięć

Wyświetl plik

@ -2,9 +2,10 @@
set -e
VERSION=`bin/buildinfo.py`
VERSION=`bin/buildinfo.py long`
SHORT_VERSION=`bin/buildinfo.py short`
BOARDS_ESP32="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec tbeam0.7"
BOARDS_ESP32="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v2.0 heltec-v2.1 tbeam0.7"
#BOARDS_ESP32=tbeam
# FIXME note nrf52840dk build is for some reason only generating a BIN file but not a HEX file nrf52840dk-geeksville is fine
@ -91,6 +92,7 @@ Generated by bin/buildall.sh -->
<resources>
<string name="cur_firmware_version" translatable="false">$VERSION</string>
<string name="short_firmware_version" translatable="false">$SHORT_VERSION</string>
</resources>
XML

Wyświetl plik

@ -1,7 +1,9 @@
#!/usr/bin/env python3
import configparser
import sys
from readprops import readProps
verObj = readProps('version.properties')
print(f"{verObj['long']}")
propName = sys.argv[1]
print(f"{verObj[propName]}")

Wyświetl plik

@ -4,17 +4,19 @@ You probably don't care about this section - skip to the next one.
## before next release
* fix python tool problem with windows and the heartbeat
* fix ttgo eink screen
* fix this sleep problem: https://meshtastic.discourse.group/t/new-device-release-1-2-30-ready-for-alpha-testing/3272/13?u=geeksville
* make native sim not touch hardware
* reenable sim in CI builds
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
* release android APK - fix recent 1.2.28 crash report
* turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code
* pine64 lora module
* nrf52 USB is unreliable while sleeping?
* @havealoha fixedposition not working
* merge https://meshtastic.discourse.group/t/spanish-translation-update/2986/5
* @luxonn reports that after a while the android app stops showing new messages
* nrf52 shows as "sleeping" in android app? (but led is blinking)
* ask for vercel access
* fix heltec battery scaling
* check android 1.2.20 usage, possibly release to general
* release android APK
* finish plan for riot.im
* add rak4600 support (with rf95 radio and limited ram)

Wyświetl plik

@ -11,7 +11,7 @@
[platformio]
default_envs = tbeam
;default_envs = tbeam0.7
;default_envs = heltec
;default_envs = heltec-v2.0
;default_envs = tlora-v1
;default_envs = tlora_v1_3
;default_envs = tlora-v2
@ -151,10 +151,19 @@ board = ttgo-t-beam
build_flags =
${esp32_base.build_flags} -D TBEAM_V07
[env:heltec]
[env:heltec-v2.0]
;build_type = debug ; to make it possible to step through our jtag debugger
extends = esp32_base
board = heltec_wifi_lora_32_V2
build_flags =
${esp32_base.build_flags} -D HELTEC_V2_0
[env:heltec-v2.1]
;build_type = debug ; to make it possible to step through our jtag debugger
extends = esp32_base
board = heltec_wifi_lora_32_V2
build_flags =
${esp32_base.build_flags} -D HELTEC_V2_1
[env:tlora-v1]
extends = esp32_base
@ -184,13 +193,13 @@ build_flags =
; The Heltec Cubecell plus
; IMPORTANT NOTE: This target doesn't yet work and probably won't ever work. I'm keeping it around for now.
; For more details see my post in the forum.
[env:cubecellplus]
platform = https://github.com/HelTecAutomation/platform-asrmicro650x.git ; we use top-of-tree because stable version has too many bugs - asrmicro650x
board = cubecell_board_plus
;[env:cubecellplus]
;platform = https://github.com/HelTecAutomation/platform-asrmicro650x.git ; we use top-of-tree because stable version has too many bugs - asrmicro650x
;board = cubecell_board_plus
; FIXME, bug in cubecell arduino - they are supposed to set ARDUINO
build_flags = ${arduino_base.build_flags} -DARDUINO=100 -Isrc/cubecell
src_filter =
${arduino_base.src_filter} -<esp32/> -<nrf52/>
;build_flags = ${arduino_base.build_flags} -DARDUINO=100 -Isrc/cubecell
;src_filter =
; ${arduino_base.src_filter} -<esp32/> -<nrf52/>
; Common settings for NRF52 based targets
[nrf52_base]
@ -312,6 +321,7 @@ debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink
; Note, this board is not yet supported! It will not work without futher development.
; THIS IS UNTESTED (I don't have this board), but other developers can use it as a starting point
[env:rak4600]
extends = nrf52_base

2
proto

@ -1 +1 @@
Subproject commit 5be5307c906f1275e4134f839b1d93283484932e
Subproject commit dfcfba8d1a6bad4233436c39f0571df878f8d2d2

Wyświetl plik

@ -102,7 +102,8 @@ class AnalogBatteryLevel : public HasBatteryLevel
last_read_time_ms = millis();
uint32_t raw = analogRead(BATTERY_PIN);
float scaled = 1000.0 * ADC_MULTIPLIER * (AREF_VOLTAGE / 1024.0) * raw;
// DEBUG_MSG("raw val=%u scaled=%u\n", raw, (uint32_t)(scaled));
// DEBUG_MSG("battery gpio %d raw val=%u scaled=%u\n", BATTERY_PIN, raw, (uint32_t)(scaled));
last_read_value = scaled;
return scaled;
} else {
@ -129,7 +130,9 @@ class AnalogBatteryLevel : public HasBatteryLevel
private:
/// If we see a battery voltage higher than physics allows - assume charger is pumping
/// in power
const float fullVolt = 4200, emptyVolt = 3270, chargingVolt = 4210, noBatVolt = 2100;
/// For heltecs with no battery connected, the measured voltage is 2204, so raising to 2230 from 2100
const float fullVolt = 4200, emptyVolt = 3270, chargingVolt = 4210, noBatVolt = 2230;
float last_read_value = 0.0;
uint32_t last_read_time_ms = 0;
} analogLevel;
@ -139,7 +142,7 @@ Power::Power() : OSThread("Power") {}
bool Power::analogInit()
{
#ifdef BATTERY_PIN
DEBUG_MSG("Using analog input for battery level\n");
DEBUG_MSG("Using analog input %d for battery level\n", BATTERY_PIN);
// disable any internal pullups
pinMode(BATTERY_PIN, INPUT);

Wyświetl plik

@ -227,8 +227,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define GPS_TX_PIN 15
#elif defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)
// This string must exactly match the case used in release file names or the android updater won't work
#define HW_VENDOR HardwareModel_HELTEC
// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine.
// Tested on Neo6m module.
@ -256,6 +254,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LORA_DIO1 35 // Not really used
#define LORA_DIO2 34 // Not really used
// ratio of voltage divider = 3.20 (R1=100k, R2=220k)
#define ADC_MULTIPLIER 3.2
#ifdef HELTEC_V2_0
// This string must exactly match the case used in release file names or the android updater won't work
#define HW_VENDOR HardwareModel_HELTEC_V2_0
#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#endif
#ifdef HELTEC_V2_1
// This string must exactly match the case used in release file names or the android updater won't work
#define HW_VENDOR HardwareModel_HELTEC_V2_1
#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#endif
#elif defined(TLORA_V1)
// This string must exactly match the case used in release file names or the android updater won't work
#define HW_VENDOR HardwareModel_TLORA_V1

Wyświetl plik

@ -17,11 +17,12 @@ typedef enum _HardwareModel {
HardwareModel_TLORA_V1 = 2,
HardwareModel_TLORA_V2_1_1p6 = 3,
HardwareModel_TBEAM = 4,
HardwareModel_HELTEC = 5,
HardwareModel_HELTEC_V2_0 = 5,
HardwareModel_TBEAM0p7 = 6,
HardwareModel_T_ECHO = 7,
HardwareModel_TLORA_V1_1p3 = 8,
HardwareModel_RAK4631 = 9,
HardwareModel_HELTEC_V2_1 = 10,
HardwareModel_LORA_RELAY_V1 = 32,
HardwareModel_NRF52840DK = 33,
HardwareModel_PPR = 34,