正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -190,11 +190,11 @@ int64_t re_create() | @@ -190,11 +190,11 @@ int64_t re_create() | ||
| 190 | int64_t deviation = re - tools_main_entrance_startup_time; | 190 | int64_t deviation = re - tools_main_entrance_startup_time; |
| 191 | trace("deviation is %d ms, pulse is %d ms", (int)(deviation), (int)(RE_PULSE_MS)); | 191 | trace("deviation is %d ms, pulse is %d ms", (int)(deviation), (int)(RE_PULSE_MS)); |
| 192 | 192 | ||
| 193 | - // so, we adjust time to max(0, deviation - pulse/4) | ||
| 194 | - // because the last pulse, we never sleep, so we use pulse/4, | 193 | + // so, we adjust time to max(0, deviation - pulse/10) |
| 194 | + // because the last pulse, we never sleep, so we use pulse/10, | ||
| 195 | // for example, when EOF at the 120ms of last pulse, | 195 | // for example, when EOF at the 120ms of last pulse, |
| 196 | // these bytes is additional data and to fill the deviation. | 196 | // these bytes is additional data and to fill the deviation. |
| 197 | - int adjust = (int)(deviation - (RE_PULSE_MS / 4)); | 197 | + int adjust = (int)(deviation - (RE_PULSE_MS / 10)); |
| 198 | if (adjust > 0) { | 198 | if (adjust > 0) { |
| 199 | trace("adjust re time, sub %d ms", adjust); | 199 | trace("adjust re time, sub %d ms", adjust); |
| 200 | re -= adjust; | 200 | re -= adjust; |
-
请 注册 或 登录 后发表评论