Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

how to promote the speed  #9

Description

@haoyuxiaoxue

thanks for your watching
recently I use this library. I find that the time of read a sbus frame is not stable. sometimes it cost 40ms.I use nonblocking model.the waitFrame function cost too much time and unstable.
how could I promete the reading speed and at the same time make the sbus frame more stable?

timer_1 = micros();
if (!sbus.waitFrame())
{
Serial.println("time out! ");
}
else
{

getChannelSignal();
processSignal(receiver_input_channel[4], n);
n++;
if (n > (USED_NUM - 1))n -= USED_NUM;
//printChannelSignal();
checkSBUS();
generate_pwm();

}
timer_2 = micros();
Serial.println(timer_2 - timer_1);

the output
19744
19756
19752
19756
42664
34736
19756
35492
55616
19752
19748
19756
23476

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions