Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Kaveh

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Kaveh reacted to BritishRacingGreen in Narada NPFC Tian Power BMS protocol   
    for sending data , you shift all the bytes thru the checksum below starting from the first 0x7C/0x7E character to the end of payload. You then append the checksum byte as well as an 0x0D  character.
    uint8_t nerada_485_checksum(uint8_t *buf, uint8_t len)
    {
        uint8_t b = 0;
        uint8_t b2 = 0;
        int num = 0;
        for (b = 0; b < len; b++)
        {
            b2 ^= buf[b];
            num += buf[b];
        }
        return (uint8_t)((uint)(b2 ^ num) & 0xFFu);

    When receiving data , you shift all the bytes thru the checksum starting at the first character up to and excluding the checksum byte and the 0x0D character. You then compare your calculated checksum against the received check sum , and also check that the last character is indeed 0x0D.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.