3 Star 2 Fork 2

李若铭 / walartminstar

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
AGPL-3.0

高效碳基演示机体系模块

gTixi适用于高效碳基芯片测试的函数库
由魏楠和李若铭开发
联系开发者:lxwk1spectre@foxmail.com
gitee项目:https://gitee.com/lxwk1spectre/walartminstar

功能介绍

该模块包含了树莓派,掌控板,未来版,未名系列演示机的通用演示架构。可以使用一套代码,兼容地运行在不同地设备上。

使用说明

安装gTixi库

在命令行中输入 pip3 install gTixi

使用硬件驱动

可以用 from gTixi import * 来读取gTixi中的全部导入,也可以根据需要部分导入。可以参考下边的实例,调用模块里的部分功能。更详细的功能可以参考文档

from gTixi import *
beam(1)#1s蜂鸣
print(wa.name)#打印设备名称
wa.i2c.write_byte_data(addr1,addr2,data)#在特定地址写入数据,如果设备支持i2c
print(wa.DrawStdLines('ab\ncd\ned\ng'))#在屏幕上显示四行数据,并打印Svg

使用完整操作界面

  1. 首先在git这里下载完整的代码,https://gitee.com/lxwk1spectre/walartminstar
  2. 文件夹中应包含gTixi文件夹,stardevice文件夹,pkg文件夹,main.py,simsum.ttf,LICENSE,README.md,以及完整的部署方案。
  3. 在main.py中编写自定义Mod,mod的具体写法参考功能模块
  4. 修改devMenu变量的内容来自定义菜单结构,注意要讲自定义的mod放入菜单中才能运行。
  5. 将整个文件夹复制到需要运行的设备上执行(缩写对应表)。
    • 如果是win或者smp,直接python main.py即可。如有必要,可以用打包工具做开机自启动之类的设置。
    • 如果是bdz演示机,需要使用adb的方法刷入。推荐使用adbGUI软件。
    • 对于zkb:
      • 需要下载mpython的官方应用并安装,USB连接电脑,打开mpython连接设备。
      • 点击掌控板文件,新建gTixi文件夹,勾选gTixi,点击下边的导入,然后选择gTIxi中的所有文件,点击同步。
      • 点击根目录下任意文件,将目标目录回到根目录下,点击下边的导入,选择main.py,点击同步。即可运行。
    • 对于wlb:
      • 将在之后的版本里更新对wlb的支持。

开发硬件驱动

  1. 如果用户需要开发第三方驱动,可以直接在写在main.py中,或者相同的文件夹里创建自己的mydrive.py文件,然后在main中import mydrive即可。
    • 可以调用wa.name判断设备类型,wa.i2c调用i2c。
    • 开发好驱动,可以写一个函数作为接口,在main.py中新建一个Mod,然后output驱动所输出的数据。
  2. 如果是gTixi的合作者,需要在gTixi包中加入新的驱动。
    • 可以将驱动内容写入myDrivers,也可以独立创建驱动的文件。
    • 需要引用同文件夹的文件的话,请使用相对导入的格式。具体例子如下,.代表模块当前文件夹。
    #相对引用
    from .alib import alib
    from . import wadapter as wad
    from .wadapter import wa
    • 驱动开发完成后,需要在__init__.py中注册驱动。
      • 在__all__变量的list中添加一个名称。
      • 在后边的代码里导入这个名称。
      • 可以参考以下示例,导入整个模块,其中的一个函数,或者一个变量。
      • 注册的时候,可以重新起名。
      • 注册完成后,就可以在main.py中from gTixi import mydrive了
    __all__ = ['newdrive','newfunc','newval']
    from . import mydrvie as newdrive
    from .mydrive import newfunc
    from .mydrive import valueA
    newval = valueA

文档

基础类

alib

  • class
  • 本质上是一种高级字典,可以通过字典字符串进行初始化,也可以输出格式更加美观的字符串。可以用.来读取字典对象。

waText,waFile

  • module
  • 支持alib运行的基础类

适配器

wad

  • module
  • 完整的适配器,会根据运行设备的不同,调用不同的代码来执行输入的判断,内容的输出,i2c,gpio等接口。围了兼容旧版程序,保留了直接调用完整的wadapter的接口,推荐用户直接使用wa和SvgScreen接口来访问wad里的内容。

wa

  • class
  • 通过判断设备类型,返回的适配当前设备的类。如果需要自己写驱动的话,需要尽量熟悉wa的使用。

wa.name

  • str

  • 当前设备类型,具体对应如下表。

    name 设备
    win windows
    smp GT0树莓派
    bdz GT1未名手表式演示机
    zkb GT2掌控板
    wlb GT2未来板
  • 推荐使用如下几种方式来区分不同设备的代码 。

    if wa.name == 'smp': 
        pass
    if wa.name in ['smp','win','zkb']:
        pass

wa.tag

  • list
  • 当前设备拥有的属性。
    tag 标识说明
    web 网络操作界面的功能,开启后在浏览器里打开localhost:8081即可访问界面
    board 用于判断是否为板载测试仪
    pinmap 已经定义好了gpio的针脚映射,反相器逻辑门管脚连通性测试会依赖该功能
    i2c 板载i2c
    smbus 目前是树莓派和未名演示机使用的i2c
    gpioboard 板载gpio
    gpiorpi 树莓派的gpio
    gpio4 未名演示机的gpio
  • 设备属性的加入,会大大方便适配器的迭代与更新,在之后的版本中,会合并一部分tag,但是会始终保持向下兼容。

wa.ctag(tag)

用于判断某设备是否具有某个tag的函数

  • tag
    • str
  • 返回 bool
  • 推荐使用如下方式来实现代码的选择性执行。
    #如果存在web标识,则运行通讯服务器和网络服务器
    if starMessager.shipei.ctag('web'):
        wsServer.start()
    if starMessager.shipei.ctag('web') and __name__ == "__main__":
        httpServer.start()

wa.aenv

  • dict
  • 当前设备的详细参数,可以使用wad.strWaEnv查看格式化之后的设备详细参数。

wa.Sleep(fDurs)

  • 系统休眠等待的函数,由于不同设备的sleep函数单位不同会导致程序运行混乱,这里根据不同设备进行了统一。
  • fDurs
    • int
    • 等待时间,单位为秒。

wa.CheckKey()

  • 等待设备直到有按键传入。
  • 目前只有Smp会用到,上下左右摇杆分别对应UDLR。
  • 关于按键的相关函数会在baseMod类中详细说明。

wa.i2c

  • 根据设备类型,统一了i2c的接口调用方式。

  • class

    • wa.i2c.write_byte_data(addr,addr,data)
    • wa.i2c.read_byte_data(addr,addr)
    • wa.read_i2c_block_data(addr,addr)
    • addr为对应的地址,标准设备的地址参照下表。
    • data为需要写入的数据。
    • 更详细地内容可以查阅i2c相关的内容,以及用户自定义设备的地址说明。
    gTixi中的标准设备i2c地址列表
    [comment|此体系中器件有统一i2c地址]
    [0x20|PCF8574IO扩展Pioneer600]
    [0x26|GTmcp的mcp23017]
    [0x39|APDS9960光线颜色传感器]
    [0x42|UPS HAT]
    [0x48|PCF8591ADDAPioneer600]
    [0x53|LTR390紫外光光感]
    [0x5a|MLX90614红外传感]
    [0x68|DS3231时钟模块Pioneer600]
    [0x76|BMP280温度压力传感Pioneer600]
    [0x77|BME280温湿度压力传感器]

wa.DrawStdLines(input)

  • 在gTixi中,最基础的输出方式为输出四行文本,其中wa里的四行文本函数,适用于在像素显示屏上显示四行文本。
  • input
    • str
    • 输出文本的内容,用\n来分割不同的行,可以不满四行,也可以超过,但是超过四行的部分不会显示。

SvgScreen

  • class
  • 绘制svg图像的类。

SvgScreen(size = (128,64))

  • 根据矢量图屏幕的大小,初始化类。

SvgScreen.Generate()

  • 输出:str
    • 根据目前的设置输出svg格式的字符串。

SvgScreen.DispShow()

  • 与Generate()功能相同

SvgScreen.DrawText(tPos,sTxt,c)

  • 在svg中写入文字的功能,字符的字号为矢量图屏幕高度的3/16。
  • tPos
    • tuple(float(x),float(y))
    • 文字的位置的,以左上角为锚点(默认的svg是以左下角为锚点,这里已经根据字号修正了,左上角更符合使用习惯),范围为0-1的浮点数。
  • sTxt
    • str
    • 文字的内容。
  • c
    • 文字的颜色,不设置的情况下,默认第一行文字为#ee0的黄色,另外三行文字为#0ee的蓝色。

SvgScreen.DrawStdLines(input)

  • 在gTixi中,最基础的输出方式为输出四行文本,该函数可以直接输出四行文本的Svg。
  • input
    • str
    • 输出文本的内容,用\n来分割不同的行。
  • 输出:str
    • 根据四行文本生成的svg脚本。

功能模块

用于与用户交互的类,包括基础的baseMod类,用于循环测试的loopMod类,以及用于菜单的menu类。用户可以在main.py中继承这些类,然后自定义模块。

menu类

用于管理操作界面菜单的类,用户不需要详细了解这个类的工作模式,只需要在main.py中根据需要进行初始化即可。

menu(sm,iniData,select=([],0))

  • sm
    • starMessager
    • 用于在异步模块之间传递信息的类,详见信使。
  • iniData
    • dict
    • 菜单结构,本质是一个多级嵌套的字典,下边是其中一个例子。字典的每一个key都会作为菜单选项(注意由于掌控板里key排序是乱的,所以需要加上数字辅助排序),而根据value的类型不同,也会有不同的效果。理论上支持无限级的菜单,推荐照顾用户体验,使用合理的菜单高度和深度。
      • value仍然是字典,那么则进入下一级菜单。
      • value属于baseMod,则进入对的扩展模块中。
      • value为0,则返回上一级菜单。
    • 操作模式
      • 两键操作,A键向下,B键进入对应key所代表的value。
      • 4键操作,↑↓控制光标向上或者向下,→为进入key代表的value,←为返回上一级菜单
    • 关于select的两个变量sub=[],pointer=0控制菜单指针位置的规则。
      • sub为[]时代表当前位置在主菜单,下边的例子中,主菜单的内容为1.器件分析,2.系统信息,3.加法器,4.模拟,5.退出,分别对应pointer的0-4。按↑↓按钮会修改pointer的值。
      • 当我们进入某个子菜单时,比如pointer为3的4.模拟,sub的list会被添加一个元素1,变为[3],然后pointer变为0,指向1.光照。我们再进入光照时,sub会变为[3,0],而pointer依然会被重置为0。
      • 在触发返回时,sub的列表里的最后一个值会被删掉,比如我们在光照子菜单下按下←返回,sub就会变成[3],而pointer会被修正为当前sub的列表里的最后一个元素的值,也就是3,通过这样的规则,确保从4.模拟中返回时,pointer仍然指向4.模拟。
    devMenu = {
        "1.器件分析":{
            "1.加法器":baseMod,
            "2.反相器":baseMod,
            "3.SRAM":baseMod,
            "4.返回":0
        },
        "2.系统信息":{
            "1.基本信息":sysInfo,
            "2.运行帧率":FrameTest,
            "3.返回":0
        },
        "3.加法器":{
            "1.单次加法":Adder,
            "2.100次加法":AdderDisplay,
            "3.100次快速":AdderTest,
            "4.返回":0        
        },
        "4.模拟":{
            "1.光照":{
                "1.单次光照":LTRLight,
                "2.异步光照":LTRAsync,
                "3.返回":0
            },
            "2.BME230":BME230,
            "3.红外":IR,
            "4.钢琴":piano,
            "5.蜂鸣器":Beam,
            "6.返回":0
        },
        "5.退出":offStatus
    }
    • 初始化菜单模块,只需要在main.py里输入如下代码,然后运行即可,windows环境下,可以访问localhost:8081进入控制界面。关于offStatus
    devMenu = {
        "1.测试模块":baseMod,
        "2.退出":offStatus
    }
    from gTixi import *
    starMessager.workModule = menu(starMessager,devMenu)
    starMessager.workModule.show()
    if starMessager.shipei.name != 'zkb':
        wsServer.start()
    if starMessager.shipei.name != 'zkb' and __name__ == "__main__":
        httpServer.start()    

baseMod类

最基础的模块类,用户自定义的类继承了基础类之后,可以重载其中的部分函数,来实现自定义的功能。

baseMod(menuInfo)

  • 生成模块的时候,需要一个记录信使和菜单坐标的变量(用于从模块退出时,保持菜单在进入时的位置),这里用户不需要详细了解,只要在继承baseMod的时候按如下格式继承即可,menu类会帮我们处理模块初始化的问题。
class newMod(baseMod):
    def __init__(self,mi):
        baseMod.__init__(self,mi)

-menuInfo的定义如下,特殊情况下,用户可以修改select的内容,来控制返回的位置。具体规则详见menu的初始化

menuInfo = {"sm":self.msgr,"initData":self.data,"select":(self.submenu,self.pointer)}

baseMod.dev

  • str
  • 代表了当前设备类型,关于设备类型详见wa.name

baseMod.msgr

  • starMessager
  • 信使,具体使用方法见信使

baseMode.path

  • str
  • 保存文件的默认文件夹,默认为main.py所在的上一级或者上上一级的Sandbox或者DAKu/testdata,用户可以通过改变path变量自行设定

baseMod.show()

  • 显示模块当前的运行状态的函数,包括像素显示屏和刷新网页控制端的内容。

baseMod.start()

  • 默认等于baseMod.show()用于函数初次调用时的动作,用户可以重载成其他内容。

baseMod.backToMenu()

  • 回到主菜单的函数,这里会根据初始化模块的menuInfo来确定回去之后菜单的位置。

baseMod.ouput(str)

  • 将四行文本显示在屏幕上。
  • str
    • str
    • 以\n分隔的四行文本。

baseMod.InputKey(key)

  • 根据输入的key值判断模块应当如何工作。默认是按下任意键都会退回主菜单,用户需要重载InputKey函数来实现自己需要的功能。

  • key

    • str
    • 不同设备有不同的key传入,可以参考下表。
    按键 key值 按键 key值 按键 key值
    网页按钮A A pioneer摇杆上 U 掌控板触摸键P P
    网页按钮B B pioneer摇杆下 D 掌控板触摸键Y Y
    网页按钮↑ U pioneer摇杆左 L 掌控板触摸键T T
    网页按钮↓ D pioneer摇杆右 R 掌控板触摸键H H
    网页按钮← L 掌控板未来版A键 A 掌控板触摸键O O
    网页按钮→ R 掌控板未来版B键 B 掌控板触摸键N N
    • 推荐使用如下的语法来重载InputKey。
    def InputKey(self,key):
        if not key:
            return
        self.msgr.msg=""
        if key in "UuH":
            self.movePointer(-1)
        elif key in "DdTAP":
            self.movePointer(1)
        elif key in "ROBN":
            if self.enterSub():
                return
        elif key in "LY":
            self.exitSub()
        self.show()    

baseMod.saveCSV(slist,backstr)

  • 将列表保存为csv文件,需要安装pandas库,保存路径参考path.
  • slist
    • list
    • 被保存的序列
  • backstr
    • str
    • 保存的文件名后缀,被保存的文件名默认为'YYYYMMDD-HHMMSS'+backstr,推荐以.csv结尾方便后续数据处理。

baseMod.saveTXT(textstr,backstr)

  • 将字符串保存为txt文件,保存路径参考path.
  • textstr
    • str
    • 被保存的字符串
  • backstr
    • str
    • 保存的文件名后缀,被保存的文件名默认为'YYYYMMDD-HHMMSS'+backstr,推荐以.txt等文本文件的扩展名结尾。

基于baseMod自定义模块的实例

以下例子为一个蜂鸣器的模块。首先继承baseMod中的所有内容,这样就可以直接调用backToMenu等函数。然后重载show和InputKey.其中show函数根据设备类型,判断屏幕显示的内容,然后InputKey函数,控制是触发蜂鸣器,还是退出模块。beam函数介绍

#蜂鸣器
class Beam(baseMod):
    def __init__(self,mi):
        baseMod.__init__(self,mi)
    def show(self):
        sf = "蜂鸣器\n"
        if self.dev in ["zkb","smp"]:
            sf += "↑A 蜂鸣\n←B 退出"
        else:
            sf += "设备不支持!\n←B 退出"
        self.output(sf)
    def InputKey(self,key):
        if not key:
            return
        if key in "UAPH":
            beam()
            self.show()
        elif key in "LBNY":
            self.backToMenu()

offStatus类

继承baseMod实现的最简单的自定义模块,在这里直接集成到了标准库中。功能为显示黑屏,然后按任意键返回菜单,可以作为一种伪关机使用。

loopMod类

将最常用的一种模块封装为一个类。进入模块后,loopUnit函数中的内容会被不断执行,按下↑或者A会暂停/继续,按下←或者B会退出。

loopMod.loopUnit()

由于高度封装,用户一般只需要重载这一个函数即可实现一个相对复杂的异步控制的功能。

基于loopMod自定义模块的实例

由于高度封装,loopMod只需要重载loopUnit,如果没有其他内容,init函数这里也可以省略不写(bme的例子)。(lightSensor, bme280

#异步光照采集器的界面
class LTRAsync(loopMod):
    def __init__(self,mi):
        loopMod.__init__(self,mi)
    def loopUnit(self):
        self.output(lightSensor())

#bme传感器
class BME230(loopMod):
    def loopUnit(self):
        self.output(bme280())

loopPro类

高级的循环测试模块,模块分为工作状态和待机状态。进入模块时为待机状态,待机状态下,按A(↑)进入工作状态,按B(←)退出。工作状态下会进行给定的循环测试,一般为特定次数一组的测试,在工作状态下,按A(↑)可以对测试进行暂停/继续,按B(←)则结束测试给出测试结果并进入待机状态。

loopPro.isRunning=False

  • bool
  • True则为工作状态,False则为待机状态。

loopPro.pause=False

  • bool
  • True则工作状态暂停,False则不暂停。

loopPro.stop=False

  • bool
  • True则工作状态收到停止命令,会在做好后处理之后进入待机状态,False则继续运行工作状态。

loopPro.loop()

  • function
  • 核心的循环函数,需要适当调用pause和stop来实现测试,一般都要重载这部分内容。具体重载方式可以参考下列代码。
#100次加法器的循环函数
    def loop(self,_=None):
        #########111#########
        rightConut = 0
        total = 100
        import time
        #以上是循环开始前的内容
        for i in range(total):
            #################222###################
            if not self.stop:
                while self.pause and not self.stop:
                    time.sleep(0.5)
            ###这部分是需要插入到循环控件中的语句#####
                result, judge = self.testOnce()
                self.output(result)
                if judge:
                    rightConut += 1                
                if self.mod == 'display':
                    time.sleep(1)
            #################333###################
            else:
                total = i
                self.stop = False
                self.pause = False
                break
            #########收到stop指令之后的处理##########
        self.output("正确率:\n{}/{}".format(rightConut,total))

loopPro的示例

#反相器=保存文件
class Inver(loopPro):
    def __init__(self,mi):
        loopPro.__init__(self,mi)
        ###重载初始化时包含了loopPro父类的相关内容###
        self.save = True
        if self.dev in ['zkb','wlb','bdz']:
            self.save = False
    def loop(self,_=None):
        import time
        total = 0
        right = 0
        if self.save:
            saveFile = []
            idx = 1
        #反相器测试为不限定次数的永久测试,直到发出停止命令
        while True:
            if not self.stop:
                while self.pause and not self.stop:
                    time.sleep(0.5)
                    ###pause和stop控制测试的暂停继续和停止
                result,right,total,io = inverter(right=right,all=total)
                if self.save:
                    sIn,sOK = io
                    saveFile.append(dict(index=idx,sIn=' '+sIn,sOk=sOK))
                    idx+=1
                    if len(saveFile)>=5e4:
                        self.saveCSV(saveFile,'-invTest.csv')
                        saveFile.clear()
                    ###调用save函数,保存测试数据
                self.output(result)
            else:
                self.stop = False
                self.pause = False
                if self.save and len(saveFile):
                    self.saveCSV(saveFile,'gateTest.csv')
                    saveFile.clear()
                    ###停止命令的后处理,如果停止了,仍然保存当前测试的数据
                break
        self.output("正确率:\n{:.3g}%".format(float(right/total*100)))
        ###测试完成输出测试结果,回到待机状态。

服务

这部分包含异步监听模块(starMessager)与网络服务模块(httpServer,wsServer)。一般不需要额外设置。

starMessager

星尘协议体系中的信使,用来在不同的异步模块中传递内容。

starMessager.stat

starMessager.msg

starMessager.wsStat

starMessager.wsMsg

  • str
  • 与异步模块交互的几个状态变量,当stat不再是waiting时,相关的异步模块就会执行对应的指令。

starMessager.shipei

  • wad.shipei
  • 值为wad.wa,适配器根据设备返回的类,具体用法见适配器wa

starMessager.starServer()

  • 现在修改为import gTixi之后,不会自动启动按键监控的进程,需要手动打开以节省资源

starMessager.workModule

  • baseMod
  • 当前正在工作的模块,gTixi控制系统通过修改workModule的值来实现不同模块之间的切换。

httpServer

wsServer

  • threading.Thread
  • 分别为网站服务器(bottle架构)和websockets通讯服务器的线程实例。根据需要,要执行如下代码即可。
  • 其中网页界面的访问地址为localhost:8081,websockets的绑定地址为localhost:8525,需要检查这两个端口是否被占用,以及防火墙是否会拦截这两个端口的出入。
from gTixi import *
wsServer.start()
httpServer.start()

webConf

配置网络服务器和websockets服务器的入口

  • class:webConfig

webConf.wsPort = '8525'

  • str
  • websockets服务器绑定的端口,默认值8525

webConf.httpPort = '8081'

  • str
  • bottle绑定的端口,默认值8081

webConf.webPath = './stardevice'

  • str
  • 网页界面的根目录

webConf.bdzPath = '/sdcard/qpython/projects3/WalArtMinS/stardevice/'

  • str
  • bdz中网页界面的绝对路径,由于bdz相对路径会出错,这里需要列出绝对路径 可以按照如下示例配置网络界面的相关参数
from gTixi import *
webConf.httpPort = '8082'
webConf.webPath = 'e:/websitepath'
webConf.wsPort = '9595'
wsServer.start()
httpServer.start()

驱动

这部分包含了gTixi标准硬件的驱动,并提供了简易的接口

bme280()

温湿度压强传感器

  • 返回:str
  • 输出样例:'Bme280测试\n25℃ 40% \n101.13kPa↑暂停\n ←退出 '

getIR()

红外检测器

  • 返回:str
  • 输出样例:'{0:02x} {1:02x} {2:02x} {3:02x}'.format(*data)

lightSensor()

光线传感器

  • 返回:str
  • 输出样例:'LTR390测试:\nUV:343, 11 lux\nLight: 33\n↑继续 ←退出'

beam(dur=0.5)

蜂鸣器,运行会产生dur秒的蜂鸣。

  • dur
    • int
    • 蜂鸣时间,单位秒。

led(r=False,g=False,b=False)

LED灯的控制器,目前兼容smp,bdz,zkb。

  • r:bool,g:bool,b:bool
    • 控制对应颜色的灯,True开启,False关闭。

adder74283(qin)

加法器测试

  • qin
    • tuple(a:int,b:int,cin:int)
    • 可以手动给加法器出题,分别是加数a(0-15),被加数b(0-15),进位(0-1)。
    • 留空的话则为系统自动用随机数给加法器出题。
  • 返回:tuple(sf:str,qin:tuple(a:int,b:int,cin:int),rout:int)
  • sf字符串样例:'74283加法器测试\n入:1+11+1 \n出:13 ↑暂停\n OK ←退出 '
    • 推荐使用 sf,, = adder74283() 的语法仅接收字符串的输出
    • 也可以用如下的方法判断加法器是否运行正确
    from gTixi import *
    sf,qin,rout = adder74183()
    if qin[0] + qin[1] + qin[2] == rout:
        print("True")
    else:
        print("False")

pins15(isBeeps=False)

管脚连通性测试

  • isBeeps
    • bool
    • True:检测到联通会发出蜂鸣。
  • 返回:str,lr
    • str:str
      • 用于显示在屏幕上的字符串。
    • lr:list
      • 连通的管脚编号。

logicTest()

逻辑门测试,根据IO特性,判断接入的逻辑门为反相器,与非门,异或门,或者D锁存器。

  • 返回:str:str,sIn:str,sOut:str
    • str为显示在屏幕上的字符串
    • sIn,sOut为逻辑门的输入输出,分别为四位的字符串。

inverter(right=0,all=0)

反相器单次测试,16个针脚,排除GND等不能用的一般一次测试6个反相器。

  • right:int
    • 本次测试开始前的正确的数量。
  • all:int
    • 本次测试开始前的总测试数量。
  • 返回:tuple(str:str,right,all)
    • right:int,all:int
      • 本次测试后的正确数量和总数。
    • str,显示在屏幕上的文本。

invqe()

6*100次一组的反相器测试。

  • 返回:gc:list(6)
    • 6个0-1之间的浮点数,分别为6个反相器测试100次的正确率。

adda(v)

数模转换器

  • v:int
    • 输入电压
  • 返回:sf:str
    • 包含了adda的响应频率,输入值和输出值

gpiopin(p0,p1)

gpio调试工具,可以用于掌控版和未来板

  • p0:bool,p1:bool
    • p0针脚和p1针脚的输出,True为高电平,False为低电平
  • 返回:sf:str
    • 用于显示在显示屏上的字符串

版本迭代

1.2.0

  • 230511
    • 加入了对m5stack(mwu)的支持
    • 修改了类的继承语法,使之支持3.4以及之前的版本
    • 修复了1.1.1版本中网页界面websockets无法使用的问题

1.1.1

  • 230319
    • 加入MAINFEST.in文件,处理非py文件的打包

1.1.0

  • 230319
    • 将smp的字体文件,webUI的网页文件压缩,一起内置如gTixi中,整个包大小控制在了1M以内。
    • 禁止了httpserver和websocketsServer的自启动,现在在import gTixi时不会启动任何服务,仅在需要的时候开启。
    • 去掉了大量print的提示,使得gTixi使用起来更加纯净。

1.0.1

  • 230328
    • 禁止了zkb,wlb的按键响应服务的自动加载,需要运行starMessager.startServer()才会自动运行。

1.0.0

  • 230307
    • 经过了与maop的开发联动,进一步验证了gTixi的稳定性
    • 完整界面的git里,加入了介绍部署方案的SOP文档。
    • 本次版本没有代码上的修改

0.1.2

  • 230111
    • 解决了多个网络界面同时开启时的同步问题
    • 解决了树莓派因为没插ssd1306版而导致的卡死问题

0.1.1

  • 230110
    • 修复了未来板闪屏的问题

0.1.0

  • 230109
    • 完成了未来板的驱动编写,未来板设备正式并入gTixi
    • 重构了部分代码,shipei类添加了tag属性
    • 第一个完整版本发布

0.0.9

  • 针对掌控板的硬件通讯进行了一系列的更新
    • 在连接了外设后,支持外设的功能会优先显示外设的测试结果,如果检测不到外设,则使用掌控板自带的硬件
    • i2c
      • 加法器测试
      • 光照传感器
      • 温度压强湿度传感器
    • smbus
      • 蜂鸣器
    • gpio
      • led灯控制
      • gpio针脚调试(新增模块gpiopin

0.0.8.1

  • 221212
  • Mod中添加了loopPro的基础操作模式,详见loopPro.
  • 添加了一系列硬件驱动:
    • 反相器测试
    • 管脚连通性测试
    • 逻辑门测试
    • ADDA驱动
    • LED灯
  • 更新了README.md

0.0.7

  • 221208
  • 修复了websockets在反复刷新网页时会出现的假死状态

0.0.6

  • 221208
  • 增加了自定义网站参数的内容,用户可以自定义网络界面的访问端口以及网站地址了。详见webConf

0.0.5

  • 221206
  • 修订readme.md

0.0.4

  • 221205
  • 将目前硬件的驱动也并入gTixi中,包括加法器,蜂鸣器,红外,bme,光线传感器。
  • 修改loopMod的逻辑,修正在暂停状态下不能停止的bug。

0.0.3

  • 221203
  • 相对稳定的初始测试版本,使用相对import引入,使架构更加科学。

0.0.2

  • 221202
  • 去除了部分alib的内容改为字典或者临时类,避免了zkb的无限重启的问题。

0.0.1

  • 221202
  • 初始版本发布。
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.

简介

高效碳基演示机体系模块 展开 收起
Python 等 3 种语言
AGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/lxwk1spectre/walartminstar.git
git@gitee.com:lxwk1spectre/walartminstar.git
lxwk1spectre
walartminstar
walartminstar
master

搜索帮助