forked from gatsby/df_datalink
update plugin
This commit is contained in:
@@ -51,7 +51,7 @@ class Plugin(Plugin_Base):
|
|||||||
{
|
{
|
||||||
"caption": "装订 - 【主】反拦截小功率",
|
"caption": "装订 - 【主】反拦截小功率",
|
||||||
"icon": "fa5.play-circle",
|
"icon": "fa5.play-circle",
|
||||||
"data": "5A 54 E3 DD 88 11 00 00 00 59 06 5A FE"
|
"data": "5A 54 E3 DD 77 11 00 00 00 48 06 5A FE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"caption": "装订 - 【主】反拦截全功率",
|
"caption": "装订 - 【主】反拦截全功率",
|
||||||
@@ -61,7 +61,7 @@ class Plugin(Plugin_Base):
|
|||||||
{
|
{
|
||||||
"caption": "装订 - 【主】反拦截静默",
|
"caption": "装订 - 【主】反拦截静默",
|
||||||
"icon": "fa5.play-circle",
|
"icon": "fa5.play-circle",
|
||||||
"data": "5A 54 E3 DD 00 11 00 00 00 D1 06 5A FE"
|
"data": "5A 54 E3 DD 88 11 00 00 00 59 06 5A FE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"caption": "遥测 - 【主】反拦截",
|
"caption": "遥测 - 【主】反拦截",
|
||||||
@@ -76,7 +76,7 @@ class Plugin(Plugin_Base):
|
|||||||
{
|
{
|
||||||
"caption": "装订 - 【从】拦截小功率",
|
"caption": "装订 - 【从】拦截小功率",
|
||||||
"icon": "fa5.play-circle",
|
"icon": "fa5.play-circle",
|
||||||
"data": "5A 54 E3 DD 88 00 00 00 00 48 06 5A FE"
|
"data": "5A 54 E3 DD 77 00 00 00 00 37 06 5A FE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"caption": "装订 - 【从】拦截大功率",
|
"caption": "装订 - 【从】拦截大功率",
|
||||||
@@ -86,7 +86,7 @@ class Plugin(Plugin_Base):
|
|||||||
{
|
{
|
||||||
"caption": "装订 - 【从】拦截静默",
|
"caption": "装订 - 【从】拦截静默",
|
||||||
"icon": "fa5.play-circle",
|
"icon": "fa5.play-circle",
|
||||||
"data": "5A 54 E3 DD 00 00 00 00 00 C0 06 5A FE"
|
"data": "5A 54 E3 DD 88 00 00 00 00 48 06 5A FE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"caption": "遥测 - 【从】拦截",
|
"caption": "遥测 - 【从】拦截",
|
||||||
@@ -291,7 +291,7 @@ class Plugin(Plugin_Base):
|
|||||||
ret += f"MGC 3~4: {payload[hwOffset+10] & 0x0f:>2d} - {payload[hwOffset+10] >> 4:>2d}\n"
|
ret += f"MGC 3~4: {payload[hwOffset+10] & 0x0f:>2d} - {payload[hwOffset+10] >> 4:>2d}\n"
|
||||||
ret += "--------------------------------\n"
|
ret += "--------------------------------\n"
|
||||||
|
|
||||||
return ret + '\n' + printFrame(data)
|
return ret + '\n' + self.printFrame(data)
|
||||||
|
|
||||||
def printFrame(self, data: bytes):
|
def printFrame(self, data: bytes):
|
||||||
ret = ''
|
ret = ''
|
||||||
@@ -425,7 +425,7 @@ class Plugin(Plugin_Base):
|
|||||||
ret += f"MGC 3~4: {payload[hwOffset+10] & 0x0f:>2d} - {payload[hwOffset+10] >> 4:>2d}\n"
|
ret += f"MGC 3~4: {payload[hwOffset+10] & 0x0f:>2d} - {payload[hwOffset+10] >> 4:>2d}\n"
|
||||||
|
|
||||||
ret += "--------------------------------\n"
|
ret += "--------------------------------\n"
|
||||||
return ret + '\n' + printFrame(data)
|
return ret + '\n' + self.printFrame(data)
|
||||||
|
|
||||||
def onSent(self, ok, msg, length, path):
|
def onSent(self, ok, msg, length, path):
|
||||||
if ok:
|
if ok:
|
||||||
@@ -437,4 +437,4 @@ class Plugin(Plugin_Base):
|
|||||||
data = item["data"]
|
data = item["data"]
|
||||||
dateBytes = self.parseSendData(data, encoding = self.configGlobal["encoding"], isHexStr = True)
|
dateBytes = self.parseSendData(data, encoding = self.configGlobal["encoding"], isHexStr = True)
|
||||||
if dateBytes:
|
if dateBytes:
|
||||||
self.send(dateBytes, callback=self.onSent)
|
self.send(dateBytes, callback=self.onSent)
|
||||||
|
|||||||
Reference in New Issue
Block a user