Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread English
rt_kprintf ("Float = %f",5/2);
发布于 2015-10-14 13:37:33 浏览:8166
订阅该版
Hi every body in function rt_kprintf("Float = %f",5/2). I don't receive result is 2.5 , only receive value is Float=%f, I don't understand why? Please help me, Thanks!
查看更多
8
个回答
默认排序
按发布时间排序
bernard
2015-10-14
这家伙很懒,什么也没写!
[s:170] aozima reply you: Please use sprintf for float then use rt_kprintf for printf.
tranchonly2015
2015-10-14
这家伙很懒,什么也没写!
in rt-thread-2.0.0_rc of me have one paragraph code in finsh_error.c ``` static const char * finsh_error_string_table[] = { "No error", "Invalid token", "Expect a type", "Unknown type", "Variable exist", "Expect a operater", "Memory full", "Unknown operator", "Unknown node", "Expect a character", "Unexpect end", "Unknown token", "Float not supported", "Unknown symbol", "Null node" }; ``` **Float not supported** => so I don't use Float data type, I've followed your instructions but unsuccessful . I want use Float data type. Can you help me solve these problems ? Or for me one examples ? Or Any idea? Thanks and Regards,
aozima
2015-10-14
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
finsh not support float, don't use float in finsh command! but you can use float data type in you C code.
tranchonly2015
2015-10-14
这家伙很懒,什么也没写!
I use float data type in code c but I use function rt_kprintf display result is fail ex: float a=3.234; rt_kprintf("result = %f",a); => it display **result = %f** if true it display **result = 3.234** please help me thanks!
bernard
2015-10-14
这家伙很懒,什么也没写!
rt_kprintf does NOT support float type data.
tranchonly2015
2015-10-14
这家伙很懒,什么也没写!
Hi bernard if I buy package support rt-thread, then I use float type data ? please let me know Thanks!
bernard
2015-10-14
这家伙很懒,什么也没写!
Why do you always say that? You can use libc API, such as sprintf to print a float data type to a buffer (as string), then use rt_kprintf to print to the UART.
撰写答案
登录
注册新账号
关注者
0
被浏览
8.2k
关于作者
tranchonly2015
这家伙很懒,什么也没写!
提问
10
回答
3
被采纳
0
关注TA
发私信
相关问题
1
Welcome to RT-Thread RTOS English discussion
2
good!
3
The speed of external SRAM of STM32
4
RT-Thread on ST Forum
5
Splay Tree
6
More RTGUI screenshot
7
STM32 pimer2
8
mini2440 support
9
Howto Run RT-Thread 0.4.0 on QEMU/mini2440
10
RT-Gui : how can use it?
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
Studio环境下ST M7系列USB主机(CherryUSB)配置及踩坑
2
RTT串口查找函数使用过程中遇到的问题。
3
RT-Thread CI编译产物artifacts自动上传功能介绍
4
STM32G030移植RT-Thread
5
CubeMX & RT-Thread Studio 联合开发说明
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
rt-smart
RTC
FAL
I2C_IIC
cubemx
ESP8266
UART
WIZnet_W5500
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
GD32
定时器
ADC
flashDB
编译报错
socket
中断
rt_mq_消息队列_msg_queue
keil_MDK
Debug
SFUD
ulog
msh
C++_cpp
MicroPython
本月问答贡献
踩姑娘的小蘑菇
4
个答案
1
次被采纳
RTT_逍遥
3
个答案
1
次被采纳
a1012112796
2
个答案
1
次被采纳
聚散无由
2
个答案
1
次被采纳
加缪
1
个答案
1
次被采纳
本月文章贡献
出出啊
1
篇文章
2
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
3
次点赞
crystal266
2
篇文章
1
次点赞
whj467467222
2
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部