Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » LoadFile("/sys/devices/virtual/thermal/ ...") does not work
Re: LoadFile("/sys/devices/virtual/thermal/ ...") does not work [message #58292 is a reply to message #58278] Tue, 12 April 2022 08:54 Go to previous messageGo to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Mirek,

None of the options below work. The file opens OK, but reading fails with all means:
	FileIn in;
	in.Open("/sys/devices/virtual/thermal/thermal_zone0/temp");
	if(in.IsError()) return -100;
	
//	String result = in.GetLine();
//	String result = in.Get(5);
	String result = in.GetAll(8);
	if(!result.IsEmpty()) return 0.001*ScanInt(~result);
	return -55.0;


Best regards,

Tom
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BiArray::Create{Head,Tail} with variadic args
Next Topic: Serialize long as uint64 on some platforms
Goto Forum:
  


Current Time: Sun Apr 28 00:27:33 CEST 2024

Total time taken to generate the page: 0.04385 seconds