commit 041fe0ed48abc31f0240afb57241cef30843231e
parent dad148b1d0e36f9a1a0d0ab9ab9bab60646ccb5b
Author: rbckman <rob@tarina.org>
Date: Wed, 20 Apr 2022 10:11:32 +0100
bug fixes
Diffstat:
3 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/gui/src/main.c b/gui/src/main.c
@@ -171,7 +171,6 @@ int main(void)
int row3 = 0;
int row4 = 0;
int row5 = 0;
- int header = 0;
// draw the text if updated
fp2 = fopen("/dev/shm/interface", "r");
if (fp2 != NULL){
@@ -195,12 +194,16 @@ int main(void)
if (showmenu == 0)
color = 6;
};
- if ((linenr == 1 + menuadd) && (read > 0))
- header = 1; //write header menu
- if ((linenr == 1 + menuadd) && (read == 0))
- header = 0; //write normal menu
- if (header == 0) {
- if ((linenr == 6 + menuadd) && (read > 0)){ //show recording time if there is any
+ if (selected == 420){
+ if (linenr == 1)
+ render_subtitle(img, line, text_size, 0, y_offset2, 5);
+ if (linenr > 1) {
+ render_subtitle(img, line, text_size, row1, y_offset3, 5);
+ row1 += read * space + morespace;
+ }
+ }
+ if (selected < 420){
+ if ((linenr == 6+menuadd) && (read > 0)){ //show recording time if there is any
render_subtitle(img, line, text_size, 700, y_offset2, 3);
}
if (linenr >= 2 + menuadd && linenr <= 5 + menuadd){
@@ -226,14 +229,6 @@ int main(void)
row5 += read * space + morespace;
}
}
- if (header == 1) {
- if (linenr == 1+menuadd)
- render_subtitle(img, line, text_size, 0, y_offset2, 5);
- if (linenr > 1+menuadd) {
- render_subtitle(img, line, text_size, row1, y_offset3, color);
- row1 += read * space + morespace;
- }
- }
linenr += 1;
free(line);
line = NULL;
diff --git a/gui/tarinagui.bin b/gui/tarinagui.bin
Binary files differ.
diff --git a/tarina.py b/tarina.py
@@ -601,7 +601,7 @@ def main():
if os.path.isdir(foldername) == False:
os.makedirs(foldername)
os.system(tarinafolder + '/alsa-utils-1.1.3/aplay/arecord -D plughw:' + str(plughw) + ' -f S16_LE -c ' + str(channels) + ' -r44100 -vv /dev/shm/' + filename + '.wav &')
- camera.start_recording(foldername + filename + '.h264', format='h264', quality=quality, level='4.2')
+ camera.start_recording(foldername + filename + '.h264', format='h264', quality=quality)
starttime = time.time()
recording = True
showmenu = 0
@@ -1108,7 +1108,7 @@ def writemenu(menu,settings,selected,header,showmenu):
def writemessage(message):
menudone = ""
- menudone += '0' + '\n'
+ menudone += '420' + '\n'
menudone += message + '\n'
#menudone += 'EOF'
#clear = 500