广州大彩串口屏论坛_大彩开发者交流论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 8940|回复: 3

if statment who not work?

[复制链接]

20

主题

53

帖子

268

积分

中级会员

Rank: 3Rank: 3

积分
268
发表于 2022-7-21 20:05:09 | 显示全部楼层 |阅读模式
本帖最后由 terefere 于 2022-7-21 20:05 编辑

I'm bit confused. Line 33 and 34 work's as I think, in array [3] is 0 or 1. But why array[1] have default value =6 if the first or second condition is met?. Sometime I see that array[1] is change only one time to right value?.



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

2

主题

1253

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12671
发表于 2022-7-22 09:01:01 | 显示全部楼层
Try adding the same sentence in the red box

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
Easy doesn't enter into Grown-up life
成年人的生活里面没有“容易”二字
回复

使用道具 举报

20

主题

53

帖子

268

积分

中级会员

Rank: 3Rank: 3

积分
268
 楼主| 发表于 2022-7-24 02:32:04 | 显示全部楼层
本帖最后由 terefere 于 2022-7-24 03:41 编辑

It's strange for me
If I add printf, then array[1] have correct value almost all time. But...
1. Why screen_id get strange value one time?. Timer hit with callback betwen screen change?
2. Why arry[3] show screen id = 1, but Why arry[1] still have 6 instead 5?. "if" statment who change array[1] is before mb_write and after screen_id refresh.
3. at time 20:18:31 you can see that one printf are missing, or... change order with modbus transmision. Why?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

2

主题

1253

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12671
发表于 2022-7-25 08:55:39 | 显示全部楼层
terefere 发表于 2022-7-24 02:32
It's strange for me
If I add printf, then array[1] have correct value almost all time. But...
1.  ...

1、When the virtual screen obtains the current screen ID, there may be some problems at first. You can download the project to the screen and run it, subject to the actual effect, the virtual screen is just a reference.
2、The second question is similar to the first one, and the virtual screen will be slightly different from the physical one.
3、There is no lack of printf at 20:18:31, but the order of appearance has changed. The command appears first and then the screen id appears, and the screen id is not wrong.
Easy doesn't enter into Grown-up life
成年人的生活里面没有“容易”二字
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|广州大彩串口屏论坛_大彩开发者交流论坛

GMT+8, 2025-4-19 08:58 , Processed in 0.051686 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表