mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
set addFilter as override
This commit is contained in:
parent
da538a1a22
commit
69eee43c81
@ -329,9 +329,6 @@ class CAN(TinyObj):
|
||||
def setMode(self, mode: str):
|
||||
pass
|
||||
|
||||
def addFilter(self, id:int, ide:int, rtr:int, mode:int,mask:int, hdr:int):
|
||||
pass
|
||||
|
||||
def enable(self):
|
||||
pass
|
||||
|
||||
@ -344,6 +341,10 @@ class CAN(TinyObj):
|
||||
def read(self, length: int) -> str:
|
||||
pass
|
||||
|
||||
# need override
|
||||
def addFilter(self, id:int, ide:int, rtr:int, mode:int,mask:int, hdr:int):
|
||||
pass
|
||||
|
||||
# need override
|
||||
def platformEnable(self):
|
||||
pass
|
||||
|
@ -7,7 +7,10 @@ void PikaStdDevice_CAN_addFilter(PikaObj* self,
|
||||
int ide,
|
||||
int mask,
|
||||
int mode,
|
||||
int rtr) {}
|
||||
int rtr) {
|
||||
obj_setErrorCode(self, 1);
|
||||
obj_setSysOut(self, "[error] platform method need to be override.");
|
||||
}
|
||||
|
||||
void PikaStdDevice_CAN_disable(PikaObj* self) {
|
||||
obj_runNativeMethod(self, "platformDisable", NULL);
|
||||
|
@ -329,9 +329,6 @@ class CAN(TinyObj):
|
||||
def setMode(self, mode: str):
|
||||
pass
|
||||
|
||||
def addFilter(self, id:int, ide:int, rtr:int, mode:int,mask:int, hdr:int):
|
||||
pass
|
||||
|
||||
def enable(self):
|
||||
pass
|
||||
|
||||
@ -344,6 +341,10 @@ class CAN(TinyObj):
|
||||
def read(self, length: int) -> str:
|
||||
pass
|
||||
|
||||
# need override
|
||||
def addFilter(self, id:int, ide:int, rtr:int, mode:int,mask:int, hdr:int):
|
||||
pass
|
||||
|
||||
# need override
|
||||
def platformEnable(self):
|
||||
pass
|
||||
|
@ -7,7 +7,10 @@ void PikaStdDevice_CAN_addFilter(PikaObj* self,
|
||||
int ide,
|
||||
int mask,
|
||||
int mode,
|
||||
int rtr) {}
|
||||
int rtr) {
|
||||
obj_setErrorCode(self, 1);
|
||||
obj_setSysOut(self, "[error] platform method need to be override.");
|
||||
}
|
||||
|
||||
void PikaStdDevice_CAN_disable(PikaObj* self) {
|
||||
obj_runNativeMethod(self, "platformDisable", NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user