This looks great, but I seem to be having trouble compiling it. I keep getting errors about missing the symbols for the properties (like property_object_front).
And I'm not really sure what this user_properties file is supposed to be, but then I haven't coded for the Pleo at all, so I'm relatively new to this. >.<
A question about the code though, wouldn't it be better to construct the filename inside the for-loop? Instead of constructing it before and inside it.
For example:
public main(){
print("main::main() enter\n");
//variables for filenames
new file_name[]="test0.bmp";
new file_number=0;
new file_number_two[2]="";
// The main VM will run the main() function again and
// again once it returns, but this infinite for loop is
// inserted to keep the main() function from returning.
for (;;){
if(property_get(property_object_front)){
//copy the right string to take the photo
while (file_exists(file_name)){
file_number=file_number+1;
string_copy(file_name,"");
string_copy(file_number_two,"");
string_concat(file_name,"test",39);
itoa(file_number,10,file_number_two,2);
string_concat(file_name,file_number_two,39);
string_concat(file_name,".bmp",39);
}
//change drive to SD-card and photo size
monitor_exec("chdrv a");
monitor_exec(string_concat("camera capture ",file_name,39));
//time for pleo to save the photo