• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

git不上传代码--.ignore的编写、pip windows的编译、cypress无法打印小数点、matlab打 ...

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

1.git有些工程文件不需要上传,编写.ignore,自动忽略不需要上传的文件

  • 右键-打开git rebase; 
  • 输入:touch .gitignore,新建.gitignore文件; 
  • 输入内容,如当前目录下的projects文件下的Release文件不需要上传:/projects/Release/*

2.问题:ImportError: No module named XlsxWriter

window pip的安装:

  1. 要到pip.exe 所在目录 或者在Path设置环境变量
  2. 然后执行 pip install XlsxWriter  

5.matlab 打印数字,没有e: disp(num2str(ans,'%f'))

>> 2000

ans =

        2000

>> disp(num2str(ans,'%f'))
2000.000000

4.cypress的软件发现无法打印小数点,需要配置一下:转载

a. Enable floating-point formatting support in newlib-nano 
  Open the Project > Build Settings > Arm GCC 4.7.3 > Linker > Command Line. Add “-u _printf_float” in the Custom Flags field. This change will result in an increase in flash usage on the order of 10 Kbytes to 15 Kbytes and a small increase in RAM usage in your application.

b.Change the whole library
  The second method is to change the whole library. Open the Project > Build Settings > Arm GCC 4.7.3 > Linker > General and set “Use newlib-nano” to false. This switch in the library to newlib will enable support for all runtime library features but will result in an increase in flash usage on the order of 25 Kbytes to 35 Kbytes and an increase in RAM usage on the order of 2 Kbytes.

Work-around for sscanf: A similar issue is also present in the sscanf function. For example, consider the following code fragment. 
 

char My_String [30]= “Pi is 3.14”;
   char My_Str1[10], My_Str2[10];
   float Pi = 2.0;
   sscanf (My_String, “%s %s %f”, My_Str1,My_Str2,&Pi);

  
  This would store “Pi” in My_Str1 and “is” in My_Str2, but 2.0 would remain in Pi instead of the expected 3.14.
  
  We can use the same work-around as described while using sprintf to handle this. However, in the case of Method 1, the additional flag is “-u _scanf_float”. When using both printf and scanf functions with Method 1, both flags must be used. 
  
  The settings are slightly different for PSoC Creator 3.1 and higher versions; we have directly provided an option to enable floating-point support with newlib-nano. See the following figure for this configuration. 

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
OD调试 delphi发布时间:2022-07-18
下一篇:
Delphi设计模式:《HeadFirst设计模式》Delphi7代码---命令模式之SimpleRemoteControl ...发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap