try to merge remote

Merge remote-tracking branch 'upstream/development' into MI32_rssi
This commit is contained in:
d0m1n1qu3 2020-07-12 21:01:36 +02:00
commit 51b3d67ca9
17 changed files with 694 additions and 343 deletions

View File

@ -6,7 +6,7 @@
- [ ] The pull request is done against the latest dev branch
- [ ] Only relevant files were touched
- [ ] Only one feature/fix was added per PR.
- [ ] The code change is tested and works on core ESP8266 V.2.7.1
- [ ] The code change is tested and works on core ESP8266 V.2.7.2
- [ ] The code change is tested and works on core ESP32 V.1.12.2
- [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).

View File

@ -21,7 +21,7 @@ While fallback or downgrading is common practice it was never supported due to S
## Supported Core versions
This release will be supported from ESP8266/Arduino library Core version **2.7.1** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
This release will be supported from ESP8266/Arduino library Core version **2.7.2** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
Although it might still compile on previous Core versions all support will be removed in the near future.
@ -35,7 +35,7 @@ For initial configuration this release supports Webserver based **WifiManager**
## Provided Binary Downloads
The following binary downloads have been compiled with ESP8266/Arduino library core version **2.7.1**.
The following binary downloads have been compiled with ESP8266/Arduino library core version **2.7.2**.
- **tasmota.bin** = The Tasmota version with most drivers. **RECOMMENDED RELEASE BINARY**
- **tasmota-BG.bin** to **tasmota-TW.bin** = The Tasmota version in different languages.
@ -52,7 +52,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
## Changelog
### Version 8.4.0 George
### Version 8.3.1.6
- Change IRremoteESP8266 library updated to v2.7.7
- Change Adafruit_SGP30 library from v1.0.3 to v1.2.0 (#8519)
@ -94,3 +94,4 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add compile time interlock parameters (#8759)
- Add compile time user template (#8766)
- Add rotary encoder support for light dimmer and optional color temperature if button1 still pressed (#8670)
- Add support for switches/relays using an AC detection circuitry e.g. MOES MS-104B or BlitzWolf SS5 (#8606)

View File

@ -110,8 +110,7 @@ build_flags = ${esp_defaults.build_flags}
; No exception code in firmware
-fno-exceptions
-lstdc++
; the following removes the 4-bytes alignment for PSTR(), waiting for a cleaner flag from Arduino Core
-DPSTR\(s\)=\(__extension__\(\{static\ const\ char\ __c\[\]\ __attribute__\(\(__aligned__\(1\)\)\)\ __attribute__\(\(section\(\ \"\\\\\".irom0.pstr.\"\ __FILE__\ \".\"\ __STRINGIZE\(__LINE__\)\ \".\"\ \ __STRINGIZE\(__COUNTER__\)\ \"\\\\\"\,\ \\\\\"aSM\\\\\"\,\ \@progbits\,\ 1\ \#\"\)\)\)\ =\ \(s\)\;\ \&__c\[0\]\;\}\)\)
; the following removes the 4-bytes alignment for PSTR()
-DPSTR_ALIGN=1
; restrict to minimal mime-types
-DMIMETYPE_MINIMAL
@ -123,8 +122,8 @@ build_flags = -DUSE_IR_REMOTE_FULL
[core]
; *** Esp8266 Arduino core 2.7.1
platform = espressif8266@2.5.3
; *** Esp8266 Arduino core 2.7.2
platform = espressif8266@2.6.0
platform_packages =
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}

View File

@ -87,7 +87,7 @@ extra_scripts = ${scripts_defaults.extra_scripts}
[tasmota_stage]
; *** Esp8266 core for Arduino version Tasmota stage
platform = espressif8266@2.5.3
platform = espressif8266@2.6.0
platform_packages = framework-arduinoespressif8266 @ https://github.com/tasmota/Arduino/releases/download/2.8.0-tasmota/esp8266-2.8.0.zip
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}
@ -123,7 +123,7 @@ build_flags = ${esp82xx_defaults.build_flags}
[core_stage]
; *** Esp8266 core for Arduino version latest development version
platform = espressif8266@2.5.3
platform = espressif8266@2.6.0
platform_packages = framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}

View File

@ -1,9 +1,3 @@
## Released
### 8.4.0 20200716
- Release George
## Unreleased (development)
### 8.3.1.6 20200617
@ -17,6 +11,7 @@
- Add compile time interlock parameters (#8759)
- Add compile time user template (#8766)
- Add rotary encoder support for light dimmer and optional color temperature if button1 still pressed (#8670)
- Add support for switches/relays using an AC detection circuitry e.g. MOES MS-104B or BlitzWolf SS5 (#8606)
- Fix exception or watchdog on rule re-entry (#8757)
- Change ESP32 USER GPIO template representation decreasing template message size
- Change define USE_TASMOTA_SLAVE into USE_TASMOTA_CLIENT
@ -67,6 +62,8 @@
- Add support for VEML6075 UVA/UVB/UVINDEX Sensor by device111 (#8432)
- Add support for VEML7700 Ambient light intensity Sensor by device111 (#8432)
## Released
### 8.3.1 20200518
- Release Fred
@ -83,6 +80,8 @@
- Change Quick Power Cycle detection from 4 to 7 power interrupts (#4066)
- Fix default state of ``SetOption73 0`` for button decoupling and send multi-press and hold MQTT messages
## Released
### 8.3.0 20200514
- Release Fred
@ -167,6 +166,8 @@
- Add support for unreachable (unplugged) Zigbee devices in Philips Hue emulation and Alexa
- Add support for 64x48 SSD1306 OLED (#6740)
## Released
### 8.2.0 20200321
- Release Elliot

View File

@ -509,6 +509,7 @@
#define D_CMND_ZIGBEEZNPRECEIVE "ZNPReceive" // only for debug
#define D_CMND_ZIGBEE_EZSP_RECEIVE "EZSPReceive" // only for debug
#define D_CMND_ZIGBEE_EZSP_RECEIVE_RAW "EZSPReceiveRaw" // only for debug
#define D_CMND_ZIGBEE_EZSP_LISTEN "Listen" // only for EZSP
#define D_CMND_ZIGBEEZNPSEND "ZNPSend"
#define D_CMND_ZIGBEE_EZSP_SEND "EZSPSend"
#define D_CMND_ZIGBEE_EZSP_SEND_RAW "EZSPSendRaw"

View File

@ -559,7 +559,11 @@
#define MTX_ADDRESS7 0x00 // [DisplayAddress7] I2C address of seventh 8x8 matrix module
#define MTX_ADDRESS8 0x00 // [DisplayAddress8] I2C address of eigth 8x8 matrix module
#define USE_DISPLAY_SEVENSEG // [DisplayModel 11] [I2cDriver47] Enable sevenseg display (I2C 0x70-0x77) (<+11k code)
#define SEVENSEG_ADDRESS1 0x70 // [DisplayAddress1] I2C address of first sevenseg matrix module
// Multiple sevenseg displays are logically arranged vertically with MTX_ADDRESS1 at y=0,
// MTX_ADDRESS2 at y=1, up to MTX_ADDRESS8 at y=7
// Command: DisplayText [yn]8888
// will display 8888 at sevenseg display at I2C address MTX_ADDRESS(n-1)
// #define SEVENSEG_ADDRESS1 0x70 // No longer used. Use MTX_ADDRESS1 - MTX_ADDRESS8 instead to specify I2C address of sevenseg displays
// #define USE_DISPLAY_SH1106 // [DisplayModel 7] [I2cDriver6] Enable SH1106 Oled 128x64 display (I2C addresses 0x3C and 0x3D)
#endif // USE_I2C

View File

@ -303,7 +303,7 @@ void ButtonHandler(void)
}
}
#ifdef ROTARY_V1
if (!((0 == button_index) && RotaryButtonPressed())) {
if (!RotaryButtonPressed(button_index)) {
#endif
if (!Settings.flag3.mqtt_buttons && single_press && SendKey(KEY_BUTTON, button_index + Button.press_counter[button_index], POWER_TOGGLE)) { // Execute Toggle command via MQTT if ButtonTopic is set
// Success

View File

@ -91,13 +91,6 @@ struct ROTARY {
void update_rotary(void) ICACHE_RAM_ATTR;
void update_rotary(void) {
if (Rotary.busy) { return; }
bool powered_on = (power);
#ifdef USE_LIGHT
if (!Settings.flag4.rotary_uses_rules) { // SetOption98 - Use rules instead of light control
powered_on = (LightPowerIRAM());
}
#endif // USE_LIGHT
if (!powered_on) { return; }
#ifdef ROTARY_OPTION1
// https://github.com/PaulStoffregen/Encoder/blob/master/Encoder.h
@ -212,8 +205,10 @@ void update_rotary(void) {
#endif // ROTARY_OPTION3
}
bool RotaryButtonPressed(void) {
//bool RotaryButtonPressed(void) {
bool RotaryButtonPressed(uint32_t button_index) {
if (!Rotary.present) { return false; }
if (0 != button_index) { return false; }
bool powered_on = (power);
#ifdef USE_LIGHT
@ -254,6 +249,13 @@ void RotaryHandler(void) {
Rotary.timeout--;
if (!Rotary.timeout) {
Rotary.direction = 0;
#ifdef USE_LIGHT
if (!Settings.flag4.rotary_uses_rules) { // SetOption98 - Use rules instead of light control
LightState(0);
MqttPublishPrefixTopic_P(RESULT_OR_STAT, PSTR(D_CMND_DIMMER));
XdrvRulesProcess();
}
#endif // USE_LIGHT
}
}
if (Rotary.last_position == Rotary.position) { return; }

View File

@ -427,7 +427,9 @@ enum EZSP_EmberOutgoingMessageType {
EMBER_OUTGOING_VIA_ADDRESS_TABLE = 0x01,
EMBER_OUTGOING_VIA_BINDING = 0x02,
EMBER_OUTGOING_MULTICAST = 0x03,
EMBER_OUTGOING_BROADCAST = 0x04
EMBER_OUTGOING_MULTICAST_WITH_ALIAS = 0x04,
EMBER_OUTGOING_BROADCAST_WITH_ALIAS = 0x05,
EMBER_OUTGOING_BROADCAST = 0x06
};
// inspired from https://github.com/zigpy/zigpy/blob/dev/zigpy/zdo/types.py

View File

@ -717,6 +717,8 @@ ZBM(ZBS_SET_POLICY_02, EZSP_setPolicy, 0x00 /*high*/, EZSP_UNICAST_REPLIES_PO
EZSP_HOST_WILL_NOT_SUPPLY_REPLY) // 55000220
ZBM(ZBS_SET_POLICY_03, EZSP_setPolicy, 0x00 /*high*/, EZSP_POLL_HANDLER_POLICY,
EZSP_POLL_HANDLER_IGNORE) // 55000330
ZBM(ZBS_SET_POLICY_04, EZSP_setPolicy, 0x00 /*high*/, EZSP_MESSAGE_CONTENTS_IN_CALLBACK_POLICY,
EZSP_MESSAGE_TAG_AND_CONTENTS_IN_CALLBACK) // 55000441
ZBM(ZBS_SET_POLICY_05, EZSP_setPolicy, 0x00 /*high*/, EZSP_TC_KEY_REQUEST_POLICY,
EZSP_ALLOW_TC_KEY_REQUESTS_AND_SEND_CURRENT_KEY) // 55000551
ZBM(ZBS_SET_POLICY_06, EZSP_setPolicy, 0x00 /*high*/, EZSP_APP_KEY_REQUEST_POLICY,
@ -871,6 +873,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = {
ZI_SEND(ZBS_SET_POLICY_00) ZI_WAIT_RECV(500, ZBR_SET_POLICY_XX)
ZI_SEND(ZBS_SET_POLICY_02) ZI_WAIT_RECV(500, ZBR_SET_POLICY_XX)
ZI_SEND(ZBS_SET_POLICY_03) ZI_WAIT_RECV(500, ZBR_SET_POLICY_XX)
// ZI_SEND(ZBS_SET_POLICY_04) ZI_WAIT_RECV(500, ZBR_SET_POLICY_XX)
ZI_SEND(ZBS_SET_POLICY_05) ZI_WAIT_RECV(500, ZBR_SET_POLICY_XX)
ZI_SEND(ZBS_SET_POLICY_06) ZI_WAIT_RECV(500, ZBR_SET_POLICY_XX)

View File

@ -935,6 +935,12 @@ void Z_IncomingMessage(ZCLFrame &zcl_received) {
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZCL_RAW_RECEIVED ": {\"0x%04X\":%s}"), srcaddr, msg.c_str());
}
// discard the message if it was sent by us (broadcast or group loopback)
if (srcaddr == localShortAddr) {
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "loopback message, ignoring"));
return; // abort the rest of message management
}
zcl_received.postProcessAttributes(srcaddr, json);
// Add Endpoint
json[F(D_CMND_ZIGBEE_ENDPOINT)] = srcendpoint;

View File

@ -26,7 +26,7 @@ const char kZbCommands[] PROGMEM = D_PRFX_ZB "|" // prefix
D_CMND_ZIGBEEZNPSEND "|" D_CMND_ZIGBEEZNPRECEIVE "|"
#endif // USE_ZIGBEE_ZNP
#ifdef USE_ZIGBEE_EZSP
D_CMND_ZIGBEE_EZSP_SEND "|" D_CMND_ZIGBEE_EZSP_RECEIVE "|"
D_CMND_ZIGBEE_EZSP_SEND "|" D_CMND_ZIGBEE_EZSP_RECEIVE "|" D_CMND_ZIGBEE_EZSP_LISTEN "|"
#endif // USE_ZIGBEE_EZSP
D_CMND_ZIGBEE_PERMITJOIN "|"
D_CMND_ZIGBEE_STATUS "|" D_CMND_ZIGBEE_RESET "|" D_CMND_ZIGBEE_SEND "|" D_CMND_ZIGBEE_PROBE "|"
@ -41,7 +41,7 @@ void (* const ZigbeeCommand[])(void) PROGMEM = {
&CmndZbZNPSend, &CmndZbZNPReceive,
#endif // USE_ZIGBEE_ZNP
#ifdef USE_ZIGBEE_EZSP
&CmndZbEZSPSend, &CmndZbEZSPReceive,
&CmndZbEZSPSend, &CmndZbEZSPReceive, &CmndZbEZSPListen,
#endif // USE_ZIGBEE_EZSP
&CmndZbPermitJoin,
&CmndZbStatus, &CmndZbReset, &CmndZbSend, &CmndZbProbe,
@ -1024,6 +1024,36 @@ void CmndZbPermitJoin(void) {
ResponseCmndDone();
}
#ifdef USE_ZIGBEE_EZSP
//
// `ZbListen`: add a multicast group to listen to
// Overcomes a current limitation that EZSP only shows messages from multicast groups it listens too
//
// Ex: `ZbListen 99`, `ZbListen2 100`
void CmndZbEZSPListen(void) {
if (zigbee.init_phase) { ResponseCmndChar_P(PSTR(D_ZIGBEE_NOT_STARTED)); return; }
int32_t index = XdrvMailbox.index - 1; // 0 based
int32_t group = XdrvMailbox.payload;
if (group <= 0) {
group = 0;
} else if (group > 0xFFFF) {
group = 0xFFFF;
}
SBuffer buf(8);
buf.add16(EZSP_setMulticastTableEntry);
buf.add8(index);
buf.add16(group); // group
buf.add8(0x01); // endpoint
buf.add8(0x00); // network index
ZigbeeEZSPSendCmd(buf.getBuffer(), buf.len(), true);
ResponseCmndDone();
}
#endif // USE_ZIGBEE_EZSP
//
// Command `ZbStatus`
//

View File

@ -28,20 +28,24 @@
#include <Adafruit_GFX.h>
#include <Adafruit_LEDBackpack.h> // Seven segment LED
Adafruit_7segment sevenseg = Adafruit_7segment();
Adafruit_7segment *sevenseg[8];
uint8_t sevensegs = 0;
uint8_t sevenseg_state = 0;
/*********************************************************************************************/
void SevensegWrite(void)
{
sevenseg.writeDisplay();
for (uint32_t i = 0; i < sevensegs; i++) {
sevenseg[i]->writeDisplay();
}
}
void SevensegClear(void)
{
sevenseg.clear();
for (uint32_t i = 0; i < sevensegs; i++) {
sevenseg[i]->clear();
}
SevensegWrite();
}
@ -50,8 +54,10 @@ void SevensegClear(void)
void SevensegInitMode(void)
{
sevenseg.setBrightness(Settings.display_dimmer);
sevenseg.blinkRate(0); // 0 - 3
for (uint32_t i = 0; i < sevensegs; i++) {
sevenseg[i]->setBrightness(Settings.display_dimmer);
sevenseg[i]->blinkRate(0);
}
SevensegClear();
}
@ -69,17 +75,25 @@ void SevensegInit(uint8_t mode)
void SevensegInitDriver(void)
{
if (!Settings.display_model) {
if (I2cSetDevice(SEVENSEG_ADDRESS1)) {
if (I2cSetDevice(Settings.display_address[0])) {
Settings.display_model = XDSP_11;
}
}
if (XDSP_11 == Settings.display_model) {
sevenseg_state = 1;
sevenseg.begin(SEVENSEG_ADDRESS1);
for (sevensegs = 0; sevensegs < 8; sevensegs++) {
if (Settings.display_address[sevensegs]) {
I2cSetActiveFound(Settings.display_address[sevensegs], "SevenSeg");
sevenseg[sevensegs] = new Adafruit_7segment();
sevenseg[sevensegs]->begin(Settings.display_address[sevensegs]);
} else {
break;
}
}
Settings.display_width = 4;
Settings.display_height = 1;
Settings.display_height = sevensegs;
SevensegInitMode();
}
@ -101,15 +115,34 @@ void SevensegDrawStringAt(uint16_t x, uint16_t y, char *str, uint16_t color, uin
boolean hex=false;
boolean done=false;
boolean s=false;
uint8_t unit=y;
if ((unit>=sevensegs) || (unit<0)) {
unit=0;
}
for (int i=0; (str[i]!='\0') && (!done); i++) {
// [prefix(es) chars]digits
// [optional prefix(es) chars]digits
// Some combinations won't make sense.
// Reference: https://learn.adafruit.com/adafruit-led-backpack/1-2-inch-7-segment-backpack-arduino-wiring-and-setup
//
// Prefixes:
// x upcoming number decimal integer displayed as hex
// : turn on middle colon
// ^ turn on top left dot
// v turn on bottom left dot
// . turn on AM/PM/Degree dot
// s upcoming number is seconds, print as HH:MM or MM:SS
// z clear this display
//
// Some sample valid combinations:
// 787 -> 787
// x47 -> 2F
// st:241 -> 04:01
// sT241 -> 4 01
// 787 -> 787
// x47 -> 2F
// s:241 -> 04:01
// s241 -> 4 01
// s1241 -> 20:41
// z ->
// x88 -> 58
switch (str[i]) {
case 'x': // print given dec value as hex
hex = true;
@ -126,12 +159,6 @@ void SevensegDrawStringAt(uint16_t x, uint16_t y, char *str, uint16_t color, uin
case '.': // print ampm
dots |= 0x10;
break;
case 'T': // print as time 12 format
t = true;
break;
case 't': // print as time 24 format
T = true;
break;
case 's': // duration in seconds
s = true;
break;
@ -149,6 +176,12 @@ void SevensegDrawStringAt(uint16_t x, uint16_t y, char *str, uint16_t color, uin
number = atoi(str+i);
done = true;
break;
case 'z': // Clear this display
hasnumber=false;
dots=0;
s=false;
sevenseg[unit]->clear();
break;
default: // unknown format, ignore
break;
}
@ -171,17 +204,17 @@ void SevensegDrawStringAt(uint16_t x, uint16_t y, char *str, uint16_t color, uin
if (hasnumber) {
if (hex) {
sevenseg.print(number, HEX);
sevenseg[unit]->print(number, HEX);
} else {
sevenseg.print(number, DEC);
sevenseg[unit]->print(number, DEC);
}
}
if (dots) {
sevenseg.writeDigitRaw(2, dots);
sevenseg[unit]->writeDigitRaw(2, dots);
}
sevenseg.writeDisplay();
sevenseg[unit]->writeDisplay();
}
/*********************************************************************************************/
@ -210,7 +243,7 @@ void SevensegTime(boolean time_24)
// Now print the time value to the display.
sevenseg.print(displayValue, DEC);
sevenseg[0]->print(displayValue, DEC);
// Add zero padding when in 24 hour mode and it's midnight.
// In this case the print function above won't have leading 0's
@ -218,15 +251,15 @@ void SevensegTime(boolean time_24)
if (time_24) {
if (hours == 0) {
// Pad hour 0.
sevenseg.writeDigitNum(1, 0);
sevenseg[0]->writeDigitNum(1, 0);
// Also pad when the 10's minute is 0 and should be padded.
if (minutes < 10) {
sevenseg.writeDigitNum(3, 0);
sevenseg[0]->writeDigitNum(3, 0);
}
}
if (hours < 10) {
// Always have 4 digits time
sevenseg.writeDigitNum(0, 0);
sevenseg[0]->writeDigitNum(0, 0);
}
} else {
// Identify and display AM/PM
@ -235,8 +268,8 @@ void SevensegTime(boolean time_24)
}
}
sevenseg.writeDigitRaw(2, dots |= ((second%2) << 1));
sevenseg.writeDisplay();
sevenseg[0]->writeDigitRaw(2, dots |= ((second%2) << 1));
sevenseg[0]->writeDisplay();
}
void SevensegRefresh(void) // Every second

View File

@ -375,12 +375,19 @@ bool Ds18x20Read(uint8_t sensor)
if (OneWireCrc8(data)) {
switch(ds18x20_sensor[index].address[0]) {
case DS18S20_CHIPID: {
/*
if (data[1] > 0x80) {
data[0] = (~data[0]) +1;
sign = -1; // App-Note fix possible sign error
}
float temp9 = (float)(data[0] >> 1) * sign;
ds18x20_sensor[index].temperature = ConvertTemp((temp9 - 0.25) + ((16.0 - data[6]) / 16.0));
Replaced by below based on issue #8777
*/
int16_t tempS = (((data[1] << 8) | (data[0] & 0xFE)) << 3) | ((0x10 - data[6]) & 0x0F);
ds18x20_sensor[index].temperature = ConvertTemp(tempS * 0.0625 - 0.250);
ds18x20_sensor[index].valid = SENSOR_MAX_MISS;
return true;
}

File diff suppressed because it is too large Load Diff

View File

@ -344,15 +344,16 @@ class Unishox:
#print("getCodeIdx not found = {r}".format(r=1))
return 1, bit_no_p
def getNumFromBits(self, inn, bit_no, count):
def getNumFromBits(self, inn, bit_no_p, count):
ret = 0
while count:
count -= 1
if self.ESCAPE_MARKER == inn[bit_no >> 3]:
bit_no += 8 # skip marker
ret += self.getBitVal(inn, bit_no, count)
bit_no += 1
return ret
if self.ESCAPE_MARKER == inn[bit_no_p >> 3]:
bit_no_p += 8 # skip marker
ret += self.getBitVal(inn, bit_no_p, count)
bit_no_p += 1
# print("getNumFromBits = {r}".format(r=ret))
return ret, bit_no_p
def readCount(self, inn, bit_no_p, len_):
(idx, bit_no_p) = self.getCodeIdx(self.us_hcode, inn, len_, bit_no_p)
@ -372,10 +373,10 @@ class Unishox:
till += (1 << bit_len_idx)
i += 1
count = self.getNumFromBits(inn, bit_no_p, bit_len_idx) + base
(count, bit_no_p) = self.getNumFromBits(inn, bit_no_p, bit_len_idx)
count = count + base
#print("readCount getNumFromBits = {count} ({bl})".format(count=count,bl=bit_len_idx))
bit_no_p += bit_len_idx
return count, bit_no_p
def decodeRepeat(self, inn, len_, out, ol, bit_no):