upojzsb

似乎 Win10 用 8 bits 来保存电池电量

  •  
  •   upojzsb · Jun 30, 2021 · 3834 views
    This topic created in 1779 days ago, the information mentioned may be changed or developed.
    ![ww.png]( https://i.loli.net/2021/06/30/KisMNl9enmHhYJt.png)
    没安装电池使用笔记本,无意间发现电池 255% 可用,看来 Win10 用 8 bits 来保存电池电量信息
    7 replies    2021-06-30 14:06:26 +08:00
    isombyt
        1
    isombyt  
       Jun 30, 2021 via Android
    没给整成-128%。很合理。
    NilChan
        2
    NilChan  
       Jun 30, 2021 via Android
    那不然呢。
    jzphx
        3
    jzphx  
       Jun 30, 2021
    看起来是个新 bug
    ncepuzs
        4
    ncepuzs  
       Jun 30, 2021
    楼主和一二楼的都是在修仙吗?
    whileFalse
        5
    whileFalse  
       Jun 30, 2021
    我觉得是电池芯片用 8bit 报告电量。
    no1xsyzy
        6
    no1xsyzy  
       Jun 30, 2021
    @isombyt 显然,你补码错了,uint8 255 == int8 -1
    WuSiYu
        7
    WuSiYu  
       Jun 30, 2021
    应该是硬件设计导致的吧,底层协议里是用 1byte 来表示电量的,没接电池就读到了全 1 的 byte 。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3205 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 14:27 · PVG 22:27 · LAX 07:27 · JFK 10:27
    ♥ Do have faith in what you're doing.