- Joined
- Nov 25, 2010
- Messages
- 1,211
- Motherboard
- AsRock X570M Pro4
- CPU
- Ryzen 3700x
- Graphics
- RX 580
This project is getting downright impressive. Excellent job to you both!
Cheers,
Ersterhernd
Cheers,
Ersterhernd
Hmmm, sounds like a great excuse to come to Canada and deliver the SMC in person .
and motorcycle season is just around the corner.
Next, perhaps a TMDS to HDMI SMC conversion board would be an idea? It would make the mod much easier for a novice to attempt.
Awesome work, I can see you are getting the hang of ObjectiveC.Preferences window added
The Slider Applet was enhanced with a preferences window in the meantime:
MacTester
Awesome work, I can see you are getting the hang of ObjectiveC
- (void) intervalTimer {
//
// 2s Interval Timer
//
if ([ReadingsWindow isVisible]) {
[self get_rpm]; // get current RPM and temperature readings by loading from the Arduino
NSLog( @"Readings refreshed");
}
// loop this function every 2s in order to refresh the readings!
dispatch_async(dispatch_get_main_queue(), ^{
[NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:@selector(intervalTimer) userInfo:nil repeats:NO];
});
}
- (IBAction)TerminalTextFieldEnter:(NSTextField *)sender {
//
// Terminal
//
// make sure serial port open
if (serialHandle<=0) serialHandle= serialport_init([serialPort UTF8String], serialBaud);{
NSString *serialCommand = [terminalTextField stringValue];//read the text field
const char *buffer = [serialCommand UTF8String];
char buf[32];
sprintf(buf, "%s\n", buffer); //format the command
serialport_write(serialHandle, buf); //send the command
NSLog(@"Terminal Message sent: %s",buf);
}
}
- (IBAction)TerminalTextFieldEnter:(NSTextField *)sender {
//
// Terminal
//
// make sure serial port open
if (serialHandle<=0) serialHandle= serialport_init([serialPort UTF8String], serialBaud);{
NSString *serialCommand = [terminalTextField stringValue];//read the text field
const char *buffer = [serialCommand UTF8String];
char buf[128];
sprintf(buf, "%s\n", buffer); //format the command
serialport_write(serialHandle, buf); //send the command
NSLog(@"Terminal Message sent: %s",buf);
// read result from serial port, until receive \n or timeout
serialport_read_until(serialHandle, buf, '\n', 128, 500);
NSString *val1 = [NSString stringWithCString:buf encoding:NSASCIIStringEncoding];
[terminalAnswerTextField setStringValue:val1]; //display the answer from the Arduino
NSLog(@"Terminal Message received: %s",buf);
}
}
- (IBAction)TerminalTextFieldEnter:(NSTextField *)sender {
//
// Terminal
//
// make sure serial port open
if (serialHandle<=0) serialHandle= serialport_init([serialPort UTF8String], serialBaud);{
NSString *serialCommand = [terminalTextField stringValue];//read the text field
const char *buffer = [serialCommand UTF8String];
char buf[512];
sprintf(buf, "%s\n", buffer); //format the command
serialport_write(serialHandle, buf); //send the command
NSLog(@"Terminal Message sent: %s",buf);
// read result from serial port, until receive \ or timeout
serialport_read_until(serialHandle, buf, '\f', 512, 100);
NSString *val1 = [NSString stringWithCString:buf encoding:NSASCIIStringEncoding];
[terminalAnswerTextView setString:val1]; //display the answer from the Arduino
NSLog(@"Terminal Message received: %s",buf);
}
}